/*! jsbin - v3.3.2 - 2013-06-25 */

function prettyDate(a) {
var b = new Date((a || "").replace(/-/g, "/").replace(/[TZ]/g, " ")),
c = ((new Date).getTime() - b.getTime()) / 1e3,
d = Math.floor(c / 86400);
if (!(isNaN(d) || 0 > d || d >= 31)) return 0 == d && (60 > c && "just now" || 120 > c && "1 minute ago" || 3600 > c && Math.floor(c / 60) + " minutes ago" || 7200 > c && "1 hour ago" || 86400 > c && Math.floor(c / 3600) + " hours ago") || 1 == d && "Yesterday" || 7 > d && d + " days ago" || 31 > d && Math.ceil(d / 7) + " weeks ago"
}

function hasStore(a) {
try {
return a in window && null !== window[a]
} catch (b) {
return !1
}
}

function throttle(a, b) {
var c = function () {
var d = this,
e = arguments;
c.cancel(), c.timer = setTimeout(function () {
a.apply(d, e)
}, b)
};
return c.cancel = function () {
clearTimeout(c.timer)
}, c
}

function escapeHTML(a) {
return String(a).replace(/&(?!\w+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;")
}

function dedupe(a) {
var b, c, d, e = {}, f = [],
g = Object.prototype.hasOwnProperty;
for (b = 0, d = a.length; d > b; b += 1) c = a[b], g.call(e, c) || (e[c] = 1, f.push(c));
return f
}

function objectValue(a, b) {
var c = a.split("."),
d = c.length,
e = 1,
f = b || window,
g = f[a];
try {
if (void 0 !== f[c[0]])
for (f = f[c[0]]; d > e && void 0 !== f[c[e]]; e++) e === d - 1 && (g = f[c[e]]), f = f[c[e]]
} catch (h) {
g = void 0
}
return g
}

function two(a) {
return ("0" + a).slice(-2)
}

function getPreparedCode(a) {
re || (re = {
docReady: /\$\(document\)\.ready/,
shortDocReady: /\$\(function/,
console: /(^.|\b)console\.(\S+)/g,
script: /<\/script/gi,
code: /%code%/,
title: /<title>(.*)<\/title>/i,
    winLoad: /window\.onload\s*=/,
    scriptopen: /<script/gi
    }), re.docReady.lastIndex = 0, re.shortDocReady.lastIndex = 0, re.console.lastIndex = 0, re.script.lastIndex = 0, re.code.lastIndex = 0, re.title.lastIndex = 0, re.winLoad.lastIndex = 0, re.scriptopen.lastIndex = 0;
    var b = [],
    c = "",
    d = "",
    e = "",
    f = "",
    g = !1,
    h = !1,
    i = !1,
    j = new Date;
    try {
    c = editors.html.render()
    } catch (k) {
    window.console && window.console.error(k.message)
    }
    if (g = !! $.trim(c), !a) try {
    d = editors.javascript.render(), d.trim() && (d += "\n\n// created @ " + two(j.getHours()) + ":" + two(j.getMinutes()) + ":" + two(j.getSeconds()))
    } catch (k) {
    window.console && window.console.error(k.message)
    }
    i = !! d.trim();
    try {
    e = editors.css.render()
    } catch (k) {
    window.console && window.console.error(k.message)
    }
    if (h = !! $.trim(e), d = d.replace(re.script, "<\\/script"), !g && i) c = "<pre>\n" + d.replace(/[<>&]/g, function (a) {
        return "<" == a ? "&lt;" : ">" == a ? "&gt;" : '"' == a ? "&quot;" : void 0
    }) + "</pre>";
    else if (re.code.test(c)) b = c.split("%code%"), c = b[0] + d + b[1];
    else if (i) {
    f = "", -1 !== c.indexOf("</body>") && (b.push(c.substring(0, c.lastIndexOf("</body>"))), b.push(c.substring(c.lastIndexOf("</body>"))), c = b[0], f = 2 == b.length && b[1] ? b[1] : "");
    var l = jsbin.panels.panels.javascript.type ? ' type="text/' + jsbin.panels.panels.javascript.type + '"' : "";
    c += "<script" + l + ">\n" + d + "\n</script>\n" + f
    }
    if (re.console.test(c)) {
    var m = "window.jsbinWindow._console.";
    c = c.replace(re.console, function (a, b, d, e) {
    var f = c.lastIndexOf("<script", e),
    g = c.lastIndexOf("</script", e);
    return f > g ? m + d : a
    })
    }
    g || i || !h ? e && g && (b = [], f = "", -1 !== c.indexOf("</head>") && (b.push(c.substring(0, c.lastIndexOf("</head>"))), b.push(c.substring(c.lastIndexOf("</head>"))), c = b[0], f = 2 == b.length && b[1] ? b[1] : ""), c += "<style>\n" + e + "\n</style>\n" + f) : c = "<pre>\n" + e + "</pre>", jsbin.ie && re.scriptopen.test(c) && (c = c.replace(/<script(.*?)>/gi, function (a, b) {
    return -1 !== b.indexOf("src") ? a : "<script defer" + b + ">"
    }));
    var n = c.match(re.title);
    return null !== n && n[1] !== documentTitle && (documentTitle = n[1], document.title = documentTitle + " - " + "JS Bin"), c
    }

    function tryToRender() {
    renderLivePreview()
    }

    function sendReload() {
    saveChecksum && $.ajax({
    url: jsbin.getURL() + "/reload",
    data: {
    code: jsbin.state.code,
    revision: jsbin.state.revision,
    checksum: saveChecksum
    },
    type: "post"
    })
    }

    function codeChangeLive(a, b) {
    clearTimeout(deferredLiveRender);
    var c, d, e = jsbin.panels.panels.live;
    jsbin.panels.ready && (jsbin.settings.includejs === !1 && "javascript" === b.panelId || e.visible && (!jsbin.lameEditor && jsbin.panels.focused && "javascript" === jsbin.panels.focused.id ? (c = jsbin.panels.focused.editor, d = c.getLine(c.getCursor().line), ignoreDuringLive.test(d) === !0 ? (throttledPreview.cancel(), deferredLiveRender = setTimeout(function () {
    codeChangeLive(a, b)
    }, 1e3)) : throttledPreview()) : throttledPreview()))
    }

    function two(a) {
    return (a + "").length < 2 ? "0" + a : a
    }

    function renderLivePreview(a) {
    var b = getPreparedCode(),
    c = $live.find("iframe").length > 0,
    d = $live.prepend('<iframe class="stretch" frameBorder="0"></iframe>').find("iframe:first"),
    e = d[0],
    f = e.contentDocument || e.contentWindow.document,
    g = f.defaultView || f.parentWindow,
    h = (new Date, []);
    a !== !0 && jsbin.settings.includejs === !1 ? b = b.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "") : a && sendReload(), b = b.replace(/(<.*?\s)(autofocus)/g, "$1");
    var i = function () {
    var e = jsbin.panels.panels.console.visible ? "window.jsbinWindow._console" : !1;
    try {
    if (f.open(), jsbin.settings.debug) window._console.info("Rendering source in debug mode"), f.write("<pre>" + b.replace(/[<>&]/g, function (a) {
                return "<" == a ? "&lt;" : ">" == a ? "&gt;" : '"' == a ? "&quot;" : void 0
            }) + "</pre>");
    else {
    var i = getDoctype(b),
    j = i.doctype;
    b = i.tail, h.push(j), a !== !0 ? h.push(killAlerts) : h.push(restoreAlerts), e && h.push('<script>(function(){window.addEventListener && window.addEventListener("error", function (event) {window. jsbinWindow._console.error({ message: event.message }, event.filename + ":" + event.lineno);}, false);}());</script>');
    var k = !1;
    g.onmousedown = function () {
    k = !0, setTimeout(function () {
    k = !1
    }, 10)
    }, g.onfocus = function () {
    return k && ($("#live").focus(), closedropdown()), !1
    }, g.onscroll = function () {
    liveScrollTop = this.scrollY
    };
    var l = $live.find(".size"),
    m = throttle(function () {
    l.fadeOut(200)
    }, 2e3);
    $(g).on("resize", function () {
    jsbin.embed || (l.show().html(this.innerWidth + "px"), m())
    }), g.resizeJSBin = throttle(function () {
    var a = $body.outerHeight(!0) - d.height() + f.documentElement.offsetHeight;
    window.parent.postMessage({
    height: a
    }, "*")
    }, 20), g.jsbinWindow = window, h.push(b), h.push(restoreAlerts), f.write(h.join("\n")), null !== liveScrollTop && g.scrollTo(0, liveScrollTop)
    }
    f.close(), jsbin.embed && (jsbin.settings.debug || g.resizeJSBin(), function () {
    var a = !1,
    b = !1,
    c = $(g);
    $(f.documentElement).mousedown(function (d) {
    d.pageY > c.height() - 40 && (a = d.pageY, b = $body.outerHeight())
    }).mousemove(function (c) {
    a !== !1 && window.parent.postMessage({
    height: b + (c.pageY - a)
    }, "*")
    }).mouseup(function () {
    a = !1
    })
    }())
    } catch (n) {
    e && window._console.error({
    message: n.message
    }, n.filename + ":" + n.lineno)
    }
    delete jsbin.panels.panels.live.doc, jsbin.panels.panels.live.doc = f, c && $live.find("iframe:last").remove()
    };
    iframedelay.active ? setTimeout(i, 0) : i()
    }

    function keycontrol(a) {
    a = normalise(a);
    var b = {};
    jsbin.panels.focused && jsbin.panels.focused.editor ? b = jsbin.panels.focused.editor : jsbin.panels.focused && (b = jsbin.panels.focused);
    var c = {
    css: 1,
    javascript: 1,
    html: 1
    }[b.id],
    d = !1,
    e = customKeys.useAlt ? a.altKey : !a.altKey;
    if (27 === a.which && !ignoreNextKey) return ignoreNextKey = !0, void 0;
    if (ignoreNextKey && void 0 !== panelShortcuts[a.which] && a.metaKey && e) return ignoreNextKey = !1, void 0;
    if (a.metaKey || (ignoreNextKey = !1), "keydown" == a.type)
    if (c && a.metaKey && 13 == a.which && (editors.console.visible && !editors.live.visible && (d = !0, $("#runconsole").click()), editors.live.visible && ($("#runwithalerts").click(), d = !0), d ? a.stop() : sendReload()), void 0 !== panelShortcuts[a.which] && a.metaKey && e && (jsbin.panels.focused.id === panelShortcuts[a.which] ? jsbin.panels.hide(panelShortcuts[a.which]) : jsbin.panels.show(panelShortcuts[a.which]), a.stop()), 191 == a.which && a.metaKey && a.shiftKey) $body.toggleClass("keyboardHelp"), keyboardHelpVisible = $body.is(".keyboardHelp"), keyboardHelpVisible && analytics.help(), a.stop();
    else if (27 == a.which && keyboardHelpVisible) $body.removeClass("keyboardHelp"), keyboardHelpVisible = !1, a.stop();
    else if (27 == a.which && jsbin.panels.focused && c);
    else if (190 == a.which && e && a.metaKey && "html" == b.id) {
    if (b.somethingSelected()) return;
    var f = b.getCursor(!1),
    g = b.getTokenAt(f),
    h = g;
    /^[\w$_]*$/.test(g.string) || (g = h = {
    start: f.ch,
    end: f.ch,
    string: "",
    state: g.state,
    className: "." == g.string ? "js-property" : null
    }), b.replaceRange("</" + g.state.htmlState.context.tagName + ">", {
line: f.line,
ch: g.end
}, {
line: f.line,
ch: g.end
}), a.stop()
} else if (188 == a.which && a.ctrlKey && a.shiftKey && c) return a.stop(), startTagComplete(b);
return a.stopping ? !1 : void 0
}

function normalise(a) {
var b = {
type: a.type,
which: a.which,
metaKey: a.metaKey,
shiftKey: a.shiftKey,
ctrlKey: a.ctrlKey,
altKey: a.altKey,
orig: a
};
null != a.which || null == a.charCode && null == a.keyCode || (b.which = null != a.charCode ? a.charCode : a.keyCode), !a.metaKey && a.ctrlKey && (b.metaKey = a.ctrlKey), 0 === a.which && a.ctrlKey === !0 && a.shiftKey === !0 && "keydown" == a.type && (b.which = 191);
var c = a.stop;
return b.stop = function () {
b.stopping = !0, c && c.call(a)
}, b
}

function upgradeConsolePanel(a) {
a.$el.click(function () {
jsconsole.focus()
}), a.reset = function () {
jsconsole.reset()
}, a.settings.render = function (a) {
var b = editors.html.render().trim();
if ("" === b) {
var c = editors.javascript.render().trim();
jsconsole.run(c)
} else renderLivePreview(a || !1)
}, a.settings.show = function () {
jsconsole.clear(), setTimeout(function () {
editors.console.ready && !jsbin.embed && jsconsole.focus()
}, 0)
}, a.settings.hide = function () {
!editors.live.visible
}, jsconsole.remote.flush(), $document.one("jsbinReady", function () {
var a = function () {
$("#runconsole")[this.visible ? "hide" : "show"]()
};
jsbin.panels.panels.live.on("show", a).on("hide", a), jsbin.panels.panels.live.visible && $("#runconsole").hide()
})
}

function opendropdown(a) {
var b;
if (!dropdownOpen) {
b = $(a).closest(".menu").addClass("open").trigger("open");
var c = b.find(":text:visible:first").focus()[0];
c && setTimeout(function () {
c.select()
}, 0), dropdownOpen = a
}
}

function closedropdown() {
menuDown = !1, dropdownOpen && (dropdownButtons.closest(".menu").removeClass("open").trigger("close"), dropdownOpen = !1, onhover = !1)
}

function populateEditor(a, b) {
if (a.codeSet) f = !0;
else {
var c = sessionStorage.getItem("jsbin.content." + b),
d = localStorage.getItem("saved-" + b),
e = sessionStorage.getItem("url"),
f = !1;
e === template.url || jsbin.state.checksum || (sessionStorage.removeItem("checksum"), saveChecksum = !1), template && c == template[b] ? a.setCode(c) : c && e == template.url ? (a.setCode(c), f = c != d && c != template[b]) : null === d || /edit/.test(window.location) || window.location.search ? a.setCode(template[b]) : a.setCode(d)
}
f && $document.trigger("codeChange", [{
revert: !1,
onload: !0
}])
}

function insertResources(a) {
$.isArray(a) || (a = [a]);
var b = 0,
c = a.length,
d = "",
e = editors.html.getCode(),
f = {
line: editors.html.editor.currentLine(),
character: editors.html.editor.getCursor().ch,
add: 0
}, g = [],
h = "";
for (b = 0; c > b; b++) d = a[b], h = d.split("/").pop(), h && e.indexOf(h + '"') && (e = isCssFile(h) ? e.replace(new RegExp('<link.*href=".*?/' + h + '".*?/>\n?'), "") : e.replace(new RegExp('<script.*src=".*?/' + h + '".*?><' + "/script>\n?"), ""), f.add--), isCssFile(d) ? g.push('<link href="' + d + '" rel="stylesheet" type="text/css" />') : g.push('<script src="' + d + '"><' + "/script>"), f.add++;
e = -1 !== e.indexOf("<head") ? e.replace(/<head>/i, "<head>\n" + g.join("\n")) : g.join("\n") + e, editors.html.setCode(e), editors.html.editor.setCursor({
line: f.line + f.add,
ch: f.character
})
}

function isCssFile(a) {
return 0 === a.length - (a.lastIndexOf(".css") + 4)
}

function testForHang(a) {
var b = new Worker(jsbin.root + "/js/render/infinite-loop-test-worker.js"),
c = null;
b.onmessage = function (d) {
clearTimeout(c), "READY" === d.data.code ? c = setTimeout(function () {
b.terminate(), a(!1)
}, 100) : "DONE" === d.data.code ? (clearTimeout(c), a(!0)) : a(!0)
}, b.postMessage(jsbin.panels.panels.javascript.getCode())
}

function hideOpen() {
urlHelpVisible ? ($body.removeClass("urlHelp"), urlHelpVisible = !1) : keyboardHelpVisible ? ($body.removeClass("keyboardHelp"), keyboardHelpVisible = !1) : dropdownOpen ? ($(".menu.open").removeClass("open"), dropdownOpen = !1) : loginVisible && ($("#login").hide(), loginVisible = !1)
}

function onSaveError(a) {
413 === a.status ? ($("#tip p").html("Sorry this bin is too large for us to save"), $(document.documentElement).addClass("showtip")) : window._console.error({
message: "Warning: Something went wrong while saving. Your most recent work is not saved."
})
}

function updateSavedState() {
$shareLinks.each(function () {
var a = jsbin.getURL() + this.getAttribute("data-path"),
b = this.nodeName;
"A" === b ? this.href = a : "INPUT" === b ? this.value = a : "TEXTAREA" === b && (this.value = ('<a class="jsbin-embed" href="' + a + '?live">' + documentTitle + "</a><" + 'script src="' + jsbin.static + '/js/embed.js"><' + "/script>").replace(/<>"&/g, function (a) {
return {
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"&": "&amp;"
}[a]
}))
})
}

function setupform(a) {
var b = $("form#saveform").empty().append('<input type="hidden" name="javascript" />').append('<input type="hidden" name="html" />').append('<input type="hidden" name="css" />').append('<input type="hidden" name="method" />').append('<input type="hidden" name="_csrf" value="' + jsbin.state.token + '" />').append('<input type="hidden" name="settings" />'),
c = {};
return jsbin.state.processors && (c.processors = jsbin.state.processors), "welcome" === jsbin.state.code && b.attr("action", "/save"), b.find("input[name=settings]").val(JSON.stringify(c)), b.find("input[name=javascript]").val(editors.javascript.getCode()), b.find("input[name=css]").val(editors.css.getCode()), b.find("input[name=html]").val(editors.html.getCode()), b.find("input[name=method]").val(a), b
}

function pad(a) {
return 10 > a ? "0" + a : a
}

function ISODateString(a) {
return a.getFullYear() + "-" + pad(a.getMonth() + 1) + "-" + pad(a.getDate()) + "T" + pad(a.getHours()) + ":" + pad(a.getMinutes()) + ":" + pad(a.getSeconds()) + "Z"
}

function saveCode(a, b, c) {
var d = setupform(a);
jsbin.panels.save(), jsbin.panels.saveOnExit = !0, b ? $.ajax({
url: d.attr("action"),
data: d.serialize(),
dataType: "json",
type: "post",
headers: {
Accept: "application/json"
},
success: function (a) {
var b, e;
d.attr("action", a.url + "/save"), c && c(a), sessionStorage.setItem("checksum", a.checksum), saveChecksum = a.checksum, jsbin.state.code = a.code, jsbin.state.revision = a.revision, b = $('#history tr[data-url="' + jsbin.getURL(!0) + '"]'), e = a.edit.replace(location.protocol + "//" + window.location.host, "") + window.location.search, b.find("td.url a span.first").removeClass("first"), b.before('<tr data-url="' + a.url + '/" data-edit-url="' + e + '"><td class="url"><a href="' + e + '?live"><span class="first">' + a.code + "/</span>" + a.revision + '/</a></td><td class="created"><a href="' + e + '" pubdate="' + a.created + '">Just now</a></td><td class="title"><a href="' + e + '">' + a.title + "</a></td></tr>"), $document.trigger("saved"), window.history && window.history.pushState ? (window.history.pushState(null, e, e), sessionStorage.setItem("url", jsbin.getURL())) : window.location.hash = a.edit
},
error: onSaveError
}) : d.submit()
}

function allowDrop(a) {
a.ondragover = function () {
return !1
}, a.ondragend = function () {
return !1
};
var b = {
javascript: 1,
coffeescript: 1,
coffee: 1,
js: 1
}, c = {
css: 1,
less: 1,
sass: 1
};
a.ondrop = function (a) {
a.preventDefault();
var d = a.dataTransfer.files[0],
e = new FileReader;
return e.onload = function (a) {
var e = d.type ? d.type.toLowerCase().replace(/^text\//, "") : d.name.toLowerCase().replace(/.*\./g, ""),
f = "html",
g = editors[f],
h = a.target.result,
i = null;
b[e] ? f = "javascript" : c[e] && (f = "css"), g = editors[f], i = g.editor.scroller, g.setCode(a.target.result), g.show();
try {
var j = new Worker(jsbin.root + "/js/editors/sync-worker.js");
j.postMessage(d), g.$el.find("> .label").append("<small> (live: edit & save in your fav editor)</small>"), j.onmessage = function (a) {
var b = i.scrollTop;
g.setCode(a.data.body), i.scrollTop = b, h = a.data.body
}
} catch (k) {}
}, e.readAsText(d), !1
}
}
location.hash && /#\/.*?\/(\d+\/)?edit/i.test(location.hash) && (window.location = jsbin.root + location.hash.substring(1) + location.search),
function (a, b) {
function c(a) {
var b, c, d = L[a] = {};
for (a = a.split(/\s+/), b = 0, c = a.length; c > b; b++) d[a[b]] = !0;
return d
}

function d(a, c, d) {
if (d === b && 1 === a.nodeType) {
var e = "data-" + c.replace(O, "-$1").toLowerCase();
if (d = a.getAttribute(e), "string" == typeof d) {
try {
d = "true" === d ? !0 : "false" === d ? !1 : "null" === d ? null : K.isNumeric(d) ? parseFloat(d) : N.test(d) ? K.parseJSON(d) : d
} catch (f) {}
K.data(a, c, d)
} else d = b
}
return d
}

function e(a) {
for (var b in a)
if (("data" !== b || !K.isEmptyObject(a[b])) && "toJSON" !== b) return !1;
return !0
}

function f(a, b, c) {
var d = b + "defer",
e = b + "queue",
f = b + "mark",
g = K._data(a, d);
!g || "queue" !== c && K._data(a, e) || "mark" !== c && K._data(a, f) || setTimeout(function () {
K._data(a, e) || K._data(a, f) || (K.removeData(a, d, !0), g.fire())
}, 0)
}

function g() {
return !1
}

function h() {
return !0
}

function i(a) {
return !a || !a.parentNode || 11 === a.parentNode.nodeType
}

function j(a, b, c) {
if (b = b || 0, K.isFunction(b)) return K.grep(a, function (a, d) {
var e = !! b.call(a, d, a);
return e === c
});
if (b.nodeType) return K.grep(a, function (a) {
return a === b === c
});
if ("string" == typeof b) {
var d = K.grep(a, function (a) {
return 1 === a.nodeType
});
if (lb.test(b)) return K.filter(b, d, !c);
b = K.filter(b, d)
}
return K.grep(a, function (a) {
return K.inArray(a, b) >= 0 === c
})
}

function k(a) {
var b = pb.split("|"),
c = a.createDocumentFragment();
if (c.createElement)
for (; b.length;) c.createElement(b.pop());
return c
}

function l(a) {
return K.nodeName(a, "table") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a
}

function m(a, b) {
if (1 === b.nodeType && K.hasData(a)) {
var c, d, e, f = K._data(a),
g = K._data(b, f),
h = f.events;
if (h) {
delete g.handle, g.events = {};
for (c in h)
for (d = 0, e = h[c].length; e > d; d++) K.event.add(b, c + (h[c][d].namespace ? "." : "") + h[c][d].namespace, h[c][d], h[c][d].data)
}
g.data && (g.data = K.extend({}, g.data))
}
}

function n(a, b) {
var c;
1 === b.nodeType && (b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(), "object" === c ? b.outerHTML = a.outerHTML : "input" !== c || "checkbox" !== a.type && "radio" !== a.type ? "option" === c ? b.selected = a.defaultSelected : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue) : (a.checked && (b.defaultChecked = b.checked = a.checked), b.value !== a.value && (b.value = a.value)), b.removeAttribute(K.expando))
}

function o(a) {
return "undefined" != typeof a.getElementsByTagName ? a.getElementsByTagName("*") : "undefined" != typeof a.querySelectorAll ? a.querySelectorAll("*") : []
}

function p(a) {
("checkbox" === a.type || "radio" === a.type) && (a.defaultChecked = a.checked)
}

function q(a) {
var b = (a.nodeName || "").toLowerCase();
"input" === b ? p(a) : "script" !== b && "undefined" != typeof a.getElementsByTagName && K.grep(a.getElementsByTagName("input"), p)
}

function r(a) {
var b = H.createElement("div");
return Db.appendChild(b), b.innerHTML = a.outerHTML, b.firstChild
}

function s(a, b) {
b.src ? K.ajax({
url: b.src,
async: !1,
dataType: "script"
}) : K.globalEval((b.text || b.textContent || b.innerHTML || "").replace(Bb, "/*$0*/")), b.parentNode && b.parentNode.removeChild(b)
}

function t(a, b, c) {
var d = "width" === b ? a.offsetWidth : a.offsetHeight,
e = "width" === b ? Ob : Pb,
f = 0,
g = e.length;
if (d > 0) {
if ("border" !== c)
for (; g > f; f++) c || (d -= parseFloat(K.css(a, "padding" + e[f])) || 0), "margin" === c ? d += parseFloat(K.css(a, c + e[f])) || 0 : d -= parseFloat(K.css(a, "border" + e[f] + "Width")) || 0;
return d + "px"
}
if (d = Eb(a, b, b), (0 > d || null == d) && (d = a.style[b] || 0), d = parseFloat(d) || 0, c)
for (; g > f; f++) d += parseFloat(K.css(a, "padding" + e[f])) || 0, "padding" !== c && (d += parseFloat(K.css(a, "border" + e[f] + "Width")) || 0), "margin" === c && (d += parseFloat(K.css(a, c + e[f])) || 0);
return d + "px"
}

function u(a) {
return function (b, c) {
if ("string" != typeof b && (c = b, b = "*"), K.isFunction(c))
for (var d, e, f, g = b.toLowerCase().split(cc), h = 0, i = g.length; i > h; h++) d = g[h], f = /^\+/.test(d), f && (d = d.substr(1) || "*"), e = a[d] = a[d] || [], e[f ? "unshift" : "push"](c)
}
}

function v(a, c, d, e, f, g) {
f = f || c.dataTypes[0], g = g || {}, g[f] = !0;
for (var h, i = a[f], j = 0, k = i ? i.length : 0, l = a === gc; k > j && (l || !h); j++) h = i[j](c, d, e), "string" == typeof h && (!l || g[h] ? h = b : (c.dataTypes.unshift(h), h = v(a, c, d, e, h, g)));
return !l && h || g["*"] || (h = v(a, c, d, e, "*", g)), h
}

function w(a, c) {
var d, e, f = K.ajaxSettings.flatOptions || {};
for (d in c) c[d] !== b && ((f[d] ? a : e || (e = {}))[d] = c[d]);
e && K.extend(!0, a, e)
}

function x(a, b, c, d) {
if (K.isArray(b)) K.each(b, function (b, e) {
c || Tb.test(a) ? d(a, e) : x(a + "[" + ("object" == typeof e || K.isArray(e) ? b : "") + "]", e, c, d)
});
else if (c || null == b || "object" != typeof b) d(a, b);
else
for (var e in b) x(a + "[" + e + "]", b[e], c, d)
}

function y(a, c, d) {
var e, f, g, h, i = a.contents,
j = a.dataTypes,
k = a.responseFields;
for (f in k) f in d && (c[k[f]] = d[f]);
for (;
"*" === j[0];) j.shift(), e === b && (e = a.mimeType || c.getResponseHeader("content-type"));
if (e)
for (f in i)
if (i[f] && i[f].test(e)) {
j.unshift(f);
break
}
if (j[0] in d) g = j[0];
else {
for (f in d) {
if (!j[0] || a.converters[f + " " + j[0]]) {
g = f;
break
}
h || (h = f)
}
g = g || h
}
return g ? (g !== j[0] && j.unshift(g), d[g]) : void 0
}

function z(a, c) {
a.dataFilter && (c = a.dataFilter(c, a.dataType));
var d, e, f, g, h, i, j, k, l = a.dataTypes,
m = {}, n = l.length,
o = l[0];
for (d = 1; n > d; d++) {
if (1 === d)
for (e in a.converters) "string" == typeof e && (m[e.toLowerCase()] = a.converters[e]);
if (g = o, o = l[d], "*" === o) o = g;
else if ("*" !== g && g !== o) {
if (h = g + " " + o, i = m[h] || m["* " + o], !i) {
k = b;
for (j in m)
if (f = j.split(" "), (f[0] === g || "*" === f[0]) && (k = m[f[1] + " " + o])) {
j = m[j], j === !0 ? i = k : k === !0 && (i = j);
break
}
}
i || k || K.error("No conversion from " + h.replace(" ", " to ")), i !== !0 && (c = i ? i(c) : k(j(c)))
}
}
return c
}

function A() {
try {
return new a.XMLHttpRequest
} catch (b) {}
}

function B() {
try {
return new a.ActiveXObject("Microsoft.XMLHTTP")
} catch (b) {}
}

function C() {
return setTimeout(D, 0), sc = K.now()
}

function D() {
sc = b
}

function E(a, b) {
var c = {};
return K.each(wc.concat.apply([], wc.slice(0, b)), function () {
c[this] = a
}), c
}

function F(a) {
if (!tc[a]) {
var b = H.body,
c = K("<" + a + ">").appendTo(b),
d = c.css("display");
c.remove(), ("none" === d || "" === d) && (pc || (pc = H.createElement("iframe"), pc.frameBorder = pc.width = pc.height = 0), b.appendChild(pc), qc && pc.createElement || (qc = (pc.contentWindow || pc.contentDocument).document, qc.write(("CSS1Compat" === H.compatMode ? "<!doctype html>" : "") + "<html><body>"), qc.close()), c = qc.createElement(a), qc.body.appendChild(c), d = K.css(c, "display"), b.removeChild(pc)), tc[a] = d
}
return tc[a]
}

function G(a) {
return K.isWindow(a) ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : !1
}
var H = a.document,
I = a.navigator,
J = a.location,
K = function () {
function c() {
if (!h.isReady) {
try {
H.documentElement.doScroll("left")
} catch (a) {
return setTimeout(c, 1), void 0
}
h.ready()
}
}
var d, e, f, g, h = function (a, b) {
return new h.fn.init(a, b, d)
}, i = a.jQuery,
j = a.$,
k = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
l = /\S/,
m = /^\s+/,
n = /\s+$/,
o = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
p = /^[\],:{}\s]*$/,
q = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
r = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
s = /(?:^|:|,)(?:\s*\[)+/g,
t = /(webkit)[ \/]([\w.]+)/,
u = /(opera)(?:.*version)?[ \/]([\w.]+)/,
v = /(msie) ([\w.]+)/,
w = /(mozilla)(?:.*? rv:([\w.]+))?/,
x = /-([a-z]|[0-9])/gi,
y = /^-ms-/,
z = function (a, b) {
return (b + "").toUpperCase()
}, A = I.userAgent,
B = Object.prototype.toString,
C = Object.prototype.hasOwnProperty,
D = Array.prototype.push,
E = Array.prototype.slice,
F = String.prototype.trim,
G = Array.prototype.indexOf,
J = {};
return h.fn = h.prototype = {
constructor: h,
init: function (a, c, d) {
var e, f, g, i;
if (!a) return this;
if (a.nodeType) return this.context = this[0] = a, this.length = 1, this;
if ("body" === a && !c && H.body) return this.context = H, this[0] = H.body, this.selector = a, this.length = 1, this;
if ("string" == typeof a) {
if (e = "<" === a.charAt(0) && ">" === a.charAt(a.length - 1) && a.length >= 3 ? [null, a, null] : k.exec(a), !e || !e[1] && c) return !c || c.jquery ? (c || d).find(a) : this.constructor(c).find(a);
if (e[1]) return c = c instanceof h ? c[0] : c, i = c ? c.ownerDocument || c : H, g = o.exec(a), g ? h.isPlainObject(c) ? (a = [H.createElement(g[1])], h.fn.attr.call(a, c, !0)) : a = [i.createElement(g[1])] : (g = h.buildFragment([e[1]], [i]), a = (g.cacheable ? h.clone(g.fragment) : g.fragment).childNodes), h.merge(this, a);
if (f = H.getElementById(e[2]), f && f.parentNode) {
if (f.id !== e[2]) return d.find(a);
this.length = 1, this[0] = f
}
return this.context = H, this.selector = a, this
}
return h.isFunction(a) ? d.ready(a) : (a.selector !== b && (this.selector = a.selector, this.context = a.context), h.makeArray(a, this))
},
selector: "",
jquery: "1.7.1",
length: 0,
size: function () {
return this.length
},
toArray: function () {
return E.call(this, 0)
},
get: function (a) {
return null == a ? this.toArray() : 0 > a ? this[this.length + a] : this[a]
},
pushStack: function (a, b, c) {
var d = this.constructor();
return h.isArray(a) ? D.apply(d, a) : h.merge(d, a), d.prevObject = this, d.context = this.context, "find" === b ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")"), d
},
each: function (a, b) {
return h.each(this, a, b)
},
ready: function (a) {
return h.bindReady(), f.add(a), this
},
eq: function (a) {
return a = +a, -1 === a ? this.slice(a) : this.slice(a, a + 1)
},
first: function () {
return this.eq(0)
},
last: function () {
return this.eq(-1)
},
slice: function () {
return this.pushStack(E.apply(this, arguments), "slice", E.call(arguments).join(","))
},
map: function (a) {
return this.pushStack(h.map(this, function (b, c) {
return a.call(b, c, b)
}))
},
end: function () {
return this.prevObject || this.constructor(null)
},
push: D,
sort: [].sort,
splice: [].splice
}, h.fn.init.prototype = h.fn, h.extend = h.fn.extend = function () {
var a, c, d, e, f, g, i = arguments[0] || {}, j = 1,
k = arguments.length,
l = !1;
for ("boolean" == typeof i && (l = i, i = arguments[1] || {}, j = 2), "object" == typeof i || h.isFunction(i) || (i = {}), k === j && (i = this, --j); k > j; j++)
if (null != (a = arguments[j]))
for (c in a) d = i[c], e = a[c], i !== e && (l && e && (h.isPlainObject(e) || (f = h.isArray(e))) ? (f ? (f = !1, g = d && h.isArray(d) ? d : []) : g = d && h.isPlainObject(d) ? d : {}, i[c] = h.extend(l, g, e)) : e !== b && (i[c] = e));
return i
}, h.extend({
noConflict: function (b) {
return a.$ === h && (a.$ = j), b && a.jQuery === h && (a.jQuery = i), h
},
isReady: !1,
readyWait: 1,
holdReady: function (a) {
a ? h.readyWait++ : h.ready(!0)
},
ready: function (a) {
if (a === !0 && !--h.readyWait || a !== !0 && !h.isReady) {
if (!H.body) return setTimeout(h.ready, 1);
if (h.isReady = !0, a !== !0 && --h.readyWait > 0) return;
f.fireWith(H, [h]), h.fn.trigger && h(H).trigger("ready").off("ready")
}
},
bindReady: function () {
if (!f) {
if (f = h.Callbacks("once memory"), "complete" === H.readyState) return setTimeout(h.ready, 1);
if (H.addEventListener) H.addEventListener("DOMContentLoaded", g, !1), a.addEventListener("load", h.ready, !1);
else if (H.attachEvent) {
H.attachEvent("onreadystatechange", g), a.attachEvent("onload", h.ready);
var b = !1;
try {
b = null == a.frameElement
} catch (d) {}
H.documentElement.doScroll && b && c()
}
}
},
isFunction: function (a) {
return "function" === h.type(a)
},
isArray: Array.isArray || function (a) {
return "array" === h.type(a)
},
isWindow: function (a) {
return a && "object" == typeof a && "setInterval" in a
},
isNumeric: function (a) {
return !isNaN(parseFloat(a)) && isFinite(a)
},
type: function (a) {
return null == a ? String(a) : J[B.call(a)] || "object"
},
isPlainObject: function (a) {
if (!a || "object" !== h.type(a) || a.nodeType || h.isWindow(a)) return !1;
try {
if (a.constructor && !C.call(a, "constructor") && !C.call(a.constructor.prototype, "isPrototypeOf")) return !1
} catch (c) {
return !1
}
var d;
for (d in a);
return d === b || C.call(a, d)
},
isEmptyObject: function (a) {
for (var b in a) return !1;
return !0
},
error: function (a) {
throw new Error(a)
},
parseJSON: function (b) {
return "string" == typeof b && b ? (b = h.trim(b), a.JSON && a.JSON.parse ? a.JSON.parse(b) : p.test(b.replace(q, "@").replace(r, "]").replace(s, "")) ? new Function("return " + b)() : (h.error("Invalid JSON: " + b), void 0)) : null
},
parseXML: function (c) {
var d, e;
try {
a.DOMParser ? (e = new DOMParser, d = e.parseFromString(c, "text/xml")) : (d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c))
} catch (f) {
d = b
}
return d && d.documentElement && !d.getElementsByTagName("parsererror").length || h.error("Invalid XML: " + c), d
},
noop: function () {},
globalEval: function (b) {
b && l.test(b) && (a.execScript || function (b) {
a.eval.call(a, b)
})(b)
},
camelCase: function (a) {
return a.replace(y, "ms-").replace(x, z)
},
nodeName: function (a, b) {
return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()
},
each: function (a, c, d) {
var e, f = 0,
g = a.length,
i = g === b || h.isFunction(a);
if (d)
if (i) {
for (e in a)
if (c.apply(a[e], d) === !1) break
} else
for (; g > f && c.apply(a[f++], d) !== !1;);
else if (i) {
for (e in a)
if (c.call(a[e], e, a[e]) === !1) break
} else
for (; g > f && c.call(a[f], f, a[f++]) !== !1;);
return a
},
trim: F ? function (a) {
return null == a ? "" : F.call(a)
} : function (a) {
return null == a ? "" : a.toString().replace(m, "").replace(n, "")
},
makeArray: function (a, b) {
var c = b || [];
if (null != a) {
var d = h.type(a);
null == a.length || "string" === d || "function" === d || "regexp" === d || h.isWindow(a) ? D.call(c, a) : h.merge(c, a)
}
return c
},
inArray: function (a, b, c) {
var d;
if (b) {
if (G) return G.call(b, a, c);
for (d = b.length, c = c ? 0 > c ? Math.max(0, d + c) : c : 0; d > c; c++)
if (c in b && b[c] === a) return c
}
return -1
},
merge: function (a, c) {
var d = a.length,
e = 0;
if ("number" == typeof c.length)
for (var f = c.length; f > e; e++) a[d++] = c[e];
else
for (; c[e] !== b;) a[d++] = c[e++];
return a.length = d, a
},
grep: function (a, b, c) {
var d, e = [];
c = !! c;
for (var f = 0, g = a.length; g > f; f++) d = !! b(a[f], f), c !== d && e.push(a[f]);
return e
},
map: function (a, c, d) {
var e, f, g = [],
i = 0,
j = a.length,
k = a instanceof h || j !== b && "number" == typeof j && (j > 0 && a[0] && a[j - 1] || 0 === j || h.isArray(a));
if (k)
for (; j > i; i++) e = c(a[i], i, d), null != e && (g[g.length] = e);
else
for (f in a) e = c(a[f], f, d), null != e && (g[g.length] = e);
return g.concat.apply([], g)
},
guid: 1,
proxy: function (a, c) {
if ("string" == typeof c) {
var d = a[c];
c = a, a = d
}
if (!h.isFunction(a)) return b;
var e = E.call(arguments, 2),
f = function () {
return a.apply(c, e.concat(E.call(arguments)))
};
return f.guid = a.guid = a.guid || f.guid || h.guid++, f
},
access: function (a, c, d, e, f, g) {
var i = a.length;
if ("object" == typeof c) {
for (var j in c) h.access(a, j, c[j], e, f, d);
return a
}
if (d !== b) {
e = !g && e && h.isFunction(d);
for (var k = 0; i > k; k++) f(a[k], c, e ? d.call(a[k], k, f(a[k], c)) : d, g);
return a
}
return i ? f(a[0], c) : b
},
now: function () {
return (new Date).getTime()
},
uaMatch: function (a) {
a = a.toLowerCase();
var b = t.exec(a) || u.exec(a) || v.exec(a) || a.indexOf("compatible") < 0 && w.exec(a) || [];
return {
browser: b[1] || "",
version: b[2] || "0"
}
},
sub: function () {
function a(b, c) {
return new a.fn.init(b, c)
}
h.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function (c, d) {
return d && d instanceof h && !(d instanceof a) && (d = a(d)), h.fn.init.call(this, c, d, b)
}, a.fn.init.prototype = a.fn;
var b = a(H);
return a
},
browser: {}
}), h.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (a, b) {
J["[object " + b + "]"] = b.toLowerCase()
}), e = h.uaMatch(A), e.browser && (h.browser[e.browser] = !0, h.browser.version = e.version), h.browser.webkit && (h.browser.safari = !0), l.test(" ") && (m = /^[\s\xA0]+/, n = /[\s\xA0]+$/), d = h(H), H.addEventListener ? g = function () {
H.removeEventListener("DOMContentLoaded", g, !1), h.ready()
} : H.attachEvent && (g = function () {
"complete" === H.readyState && (H.detachEvent("onreadystatechange", g), h.ready())
}), h
}(),
L = {};
K.Callbacks = function (a) {
a = a ? L[a] || c(a) : {};
var d, e, f, g, h, i = [],
j = [],
k = function (b) {
var c, d, e, f;
for (c = 0, d = b.length; d > c; c++) e = b[c], f = K.type(e), "array" === f ? k(e) : "function" === f && (a.unique && m.has(e) || i.push(e))
}, l = function (b, c) {
for (c = c || [], d = !a.memory || [b, c], e = !0, h = f || 0, f = 0, g = i.length; i && g > h; h++)
if (i[h].apply(b, c) === !1 && a.stopOnFalse) {
d = !0;
break
}
e = !1, i && (a.once ? d === !0 ? m.disable() : i = [] : j && j.length && (d = j.shift(), m.fireWith(d[0], d[1])))
}, m = {
add: function () {
if (i) {
var a = i.length;
k(arguments), e ? g = i.length : d && d !== !0 && (f = a, l(d[0], d[1]))
}
return this
},
remove: function () {
if (i)
for (var b = arguments, c = 0, d = b.length; d > c; c++)
for (var f = 0; f < i.length && (b[c] !== i[f] || (e && g >= f && (g--, h >= f && h--), i.splice(f--, 1), !a.unique)); f++);
return this
},
has: function (a) {
if (i)
for (var b = 0, c = i.length; c > b; b++)
if (a === i[b]) return !0;
return !1
},
empty: function () {
return i = [], this
},
disable: function () {
return i = j = d = b, this
},
disabled: function () {
return !i
},
lock: function () {
return j = b, d && d !== !0 || m.disable(), this
},
locked: function () {
return !j
},
fireWith: function (b, c) {
return j && (e ? a.once || j.push([b, c]) : a.once && d || l(b, c)), this
},
fire: function () {
return m.fireWith(this, arguments), this
},
fired: function () {
return !!d
}
};
return m
};
var M = [].slice;
K.extend({
Deferred: function (a) {
var b, c = K.Callbacks("once memory"),
d = K.Callbacks("once memory"),
e = K.Callbacks("memory"),
f = "pending",
g = {
resolve: c,
reject: d,
notify: e
}, h = {
done: c.add,
fail: d.add,
progress: e.add,
state: function () {
return f
},
isResolved: c.fired,
isRejected: d.fired,
then: function (a, b, c) {
return i.done(a).fail(b).progress(c), this
},
always: function () {
return i.done.apply(i, arguments).fail.apply(i, arguments), this
},
pipe: function (a, b, c) {
return K.Deferred(function (d) {
K.each({
done: [a, "resolve"],
fail: [b, "reject"],
progress: [c, "notify"]
}, function (a, b) {
var c, e = b[0],
f = b[1];
K.isFunction(e) ? i[a](function () {
c = e.apply(this, arguments), c && K.isFunction(c.promise) ? c.promise().then(d.resolve, d.reject, d.notify) : d[f + "With"](this === i ? d : this, [c])
}) : i[a](d[f])
})
}).promise()
},
promise: function (a) {
if (null == a) a = h;
else
for (var b in h) a[b] = h[b];
return a
}
}, i = h.promise({});
for (b in g) i[b] = g[b].fire, i[b + "With"] = g[b].fireWith;
return i.done(function () {
f = "resolved"
}, d.disable, e.lock).fail(function () {
f = "rejected"
}, c.disable, e.lock), a && a.call(i, i), i
},
when: function (a) {
function b(a) {
return function (b) {
d[a] = arguments.length > 1 ? M.call(arguments, 0) : b, --h || i.resolveWith(i, d)
}
}

function c(a) {
return function (b) {
g[a] = arguments.length > 1 ? M.call(arguments, 0) : b, i.notifyWith(j, g)
}
}
var d = M.call(arguments, 0),
e = 0,
f = d.length,
g = new Array(f),
h = f,
i = 1 >= f && a && K.isFunction(a.promise) ? a : K.Deferred(),
j = i.promise();
if (f > 1) {
for (; f > e; e++) d[e] && d[e].promise && K.isFunction(d[e].promise) ? d[e].promise().then(b(e), i.reject, c(e)) : --h;
h || i.resolveWith(i, d)
} else i !== a && i.resolveWith(i, f ? [a] : []);
return j
}
}), K.support = function () {
var b, c, d, e, f, g, h, i, j, k, l, m, n = H.createElement("div");
if (H.documentElement, n.setAttribute("className", "t"), n.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>", c = n.getElementsByTagName("*"), d = n.getElementsByTagName("a")[0], !c || !c.length || !d) return {};
e = H.createElement("select"), f = e.appendChild(H.createElement("option")), g = n.getElementsByTagName("input")[0], b = {
leadingWhitespace: 3 === n.firstChild.nodeType,
tbody: !n.getElementsByTagName("tbody").length,
htmlSerialize: !! n.getElementsByTagName("link").length,
style: /top/.test(d.getAttribute("style")),
hrefNormalized: "/a" === d.getAttribute("href"),
opacity: /^0.55/.test(d.style.opacity),
cssFloat: !! d.style.cssFloat,
checkOn: "on" === g.value,
optSelected: f.selected,
getSetAttribute: "t" !== n.className,
enctype: !! H.createElement("form").enctype,
html5Clone: "<:nav></:nav>" !== H.createElement("nav").cloneNode(!0).outerHTML,
submitBubbles: !0,
changeBubbles: !0,
focusinBubbles: !1,
deleteExpando: !0,
noCloneEvent: !0,
inlineBlockNeedsLayout: !1,
shrinkWrapBlocks: !1,
reliableMarginRight: !0
}, g.checked = !0, b.noCloneChecked = g.cloneNode(!0).checked, e.disabled = !0, b.optDisabled = !f.disabled;
try {
delete n.test
} catch (o) {
b.deleteExpando = !1
}
if (!n.addEventListener && n.attachEvent && n.fireEvent && (n.attachEvent("onclick", function () {
b.noCloneEvent = !1
}), n.cloneNode(!0).fireEvent("onclick")), g = H.createElement("input"), g.value = "t", g.setAttribute("type", "radio"), b.radioValue = "t" === g.value, g.setAttribute("checked", "checked"), n.appendChild(g), i = H.createDocumentFragment(), i.appendChild(n.lastChild), b.checkClone = i.cloneNode(!0).cloneNode(!0).lastChild.checked, b.appendChecked = g.checked, i.removeChild(g), i.appendChild(n), n.innerHTML = "", a.getComputedStyle && (h = H.createElement("div"), h.style.width = "0", h.style.marginRight = "0", n.style.width = "2px", n.appendChild(h), b.reliableMarginRight = 0 === (parseInt((a.getComputedStyle(h, null) || {
marginRight: 0
}).marginRight, 10) || 0)), n.attachEvent)
for (l in {
submit: 1,
change: 1,
focusin: 1
}) k = "on" + l, m = k in n, m || (n.setAttribute(k, "return;"), m = "function" == typeof n[k]), b[l + "Bubbles"] = m;
return i.removeChild(n), i = e = f = h = n = g = null, K(function () {
var a, c, d, e, f, g, h, i, k, l, o = H.getElementsByTagName("body")[0];
o && (g = 1, h = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;", i = "visibility:hidden;border:0;", k = "style='" + h + "border:5px solid #000;padding:0;'", l = "<div " + k + "><div></div></div>" + "<table " + k + " cellpadding='0' cellspacing='0'>" + "<tr><td></td></tr></table>", a = H.createElement("div"), a.style.cssText = i + "width:0;height:0;position:static;top:0;margin-top:" + g + "px", o.insertBefore(a, o.firstChild), n = H.createElement("div"), a.appendChild(n), n.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>", j = n.getElementsByTagName("td"), m = 0 === j[0].offsetHeight, j[0].style.display = "", j[1].style.display = "none", b.reliableHiddenOffsets = m && 0 === j[0].offsetHeight, n.innerHTML = "", n.style.width = n.style.paddingLeft = "1px", K.boxModel = b.boxModel = 2 === n.offsetWidth, "undefined" != typeof n.style.zoom && (n.style.display = "inline", n.style.zoom = 1, b.inlineBlockNeedsLayout = 2 === n.offsetWidth, n.style.display = "", n.innerHTML = "<div style='width:4px;'></div>", b.shrinkWrapBlocks = 2 !== n.offsetWidth), n.style.cssText = h + i, n.innerHTML = l, c = n.firstChild, d = c.firstChild, e = c.nextSibling.firstChild.firstChild, f = {
doesNotAddBorder: 5 !== d.offsetTop,
doesAddBorderForTableAndCells: 5 === e.offsetTop
}, d.style.position = "fixed", d.style.top = "20px", f.fixedPosition = 20 === d.offsetTop || 15 === d.offsetTop, d.style.position = d.style.top = "", c.style.overflow = "hidden", c.style.position = "relative", f.subtractsBorderForOverflowNotVisible = -5 === d.offsetTop, f.doesNotIncludeMarginInBodyOffset = o.offsetTop !== g, o.removeChild(a), n = a = null, K.extend(b, f))
}), b
}();
var N = /^(?:\{.*\}|\[.*\])$/,
O = /([A-Z])/g;
K.extend({
cache: {},
uuid: 0,
expando: "jQuery" + (K.fn.jquery + Math.random()).replace(/\D/g, ""),
noData: {
embed: !0,
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
applet: !0
},
hasData: function (a) {
return a = a.nodeType ? K.cache[a[K.expando]] : a[K.expando], !! a && !e(a)
},
data: function (a, c, d, e) {
if (K.acceptData(a)) {
var f, g, h, i = K.expando,
j = "string" == typeof c,
k = a.nodeType,
l = k ? K.cache : a,
m = k ? a[i] : a[i] && i,
n = "events" === c;
if (m && l[m] && (n || e || l[m].data) || !j || d !== b) return m || (k ? a[i] = m = ++K.uuid : m = i), l[m] || (l[m] = {}, k || (l[m].toJSON = K.noop)), ("object" == typeof c || "function" == typeof c) && (e ? l[m] = K.extend(l[m], c) : l[m].data = K.extend(l[m].data, c)), f = g = l[m], e || (g.data || (g.data = {}), g = g.data), d !== b && (g[K.camelCase(c)] = d), n && !g[c] ? f.events : (j ? (h = g[c], null == h && (h = g[K.camelCase(c)])) : h = g, h)
}
},
removeData: function (a, b, c) {
if (K.acceptData(a)) {
var d, f, g, h = K.expando,
i = a.nodeType,
j = i ? K.cache : a,
k = i ? a[h] : h;
if (j[k]) {
if (b && (d = c ? j[k] : j[k].data)) {
K.isArray(b) || (b in d ? b = [b] : (b = K.camelCase(b), b = b in d ? [b] : b.split(" ")));
for (f = 0, g = b.length; g > f; f++) delete d[b[f]];
if (!(c ? e : K.isEmptyObject)(d)) return
}(c || (delete j[k].data, e(j[k]))) && (K.support.deleteExpando || !j.setInterval ? delete j[k] : j[k] = null, i && (K.support.deleteExpando ? delete a[h] : a.removeAttribute ? a.removeAttribute(h) : a[h] = null))
}
}
},
_data: function (a, b, c) {
return K.data(a, b, c, !0)
},
acceptData: function (a) {
if (a.nodeName) {
var b = K.noData[a.nodeName.toLowerCase()];
if (b) return !(b === !0 || a.getAttribute("classid") !== b)
}
return !0
}
}), K.fn.extend({
data: function (a, c) {
var e, f, g, h = null;
if ("undefined" == typeof a) {
if (this.length && (h = K.data(this[0]), 1 === this[0].nodeType && !K._data(this[0], "parsedAttrs"))) {
f = this[0].attributes;
for (var i = 0, j = f.length; j > i; i++) g = f[i].name, 0 === g.indexOf("data-") && (g = K.camelCase(g.substring(5)), d(this[0], g, h[g]));
K._data(this[0], "parsedAttrs", !0)
}
return h
}
return "object" == typeof a ? this.each(function () {
K.data(this, a)
}) : (e = a.split("."), e[1] = e[1] ? "." + e[1] : "", c === b ? (h = this.triggerHandler("getData" + e[1] + "!", [e[0]]), h === b && this.length && (h = K.data(this[0], a), h = d(this[0], a, h)), h === b && e[1] ? this.data(e[0]) : h) : this.each(function () {
var b = K(this),
d = [e[0], c];
b.triggerHandler("setData" + e[1] + "!", d), K.data(this, a, c), b.triggerHandler("changeData" + e[1] + "!", d)
}))
},
removeData: function (a) {
return this.each(function () {
K.removeData(this, a)
})
}
}), K.extend({
_mark: function (a, b) {
a && (b = (b || "fx") + "mark", K._data(a, b, (K._data(a, b) || 0) + 1))
},
_unmark: function (a, b, c) {
if (a !== !0 && (c = b, b = a, a = !1), b) {
c = c || "fx";
var d = c + "mark",
e = a ? 0 : (K._data(b, d) || 1) - 1;
e ? K._data(b, d, e) : (K.removeData(b, d, !0), f(b, c, "mark"))
}
},
queue: function (a, b, c) {
var d;
return a ? (b = (b || "fx") + "queue", d = K._data(a, b), c && (!d || K.isArray(c) ? d = K._data(a, b, K.makeArray(c)) : d.push(c)), d || []) : void 0
},
dequeue: function (a, b) {
b = b || "fx";
var c = K.queue(a, b),
d = c.shift(),
e = {};
"inprogress" === d && (d = c.shift()), d && ("fx" === b && c.unshift("inprogress"), K._data(a, b + ".run", e), d.call(a, function () {
K.dequeue(a, b)
}, e)), c.length || (K.removeData(a, b + "queue " + b + ".run", !0), f(a, b, "queue"))
}
}), K.fn.extend({
queue: function (a, c) {
return "string" != typeof a && (c = a, a = "fx"), c === b ? K.queue(this[0], a) : this.each(function () {
var b = K.queue(this, a, c);
"fx" === a && "inprogress" !== b[0] && K.dequeue(this, a)
})
},
dequeue: function (a) {
return this.each(function () {
K.dequeue(this, a)
})
},
delay: function (a, b) {
return a = K.fx ? K.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function (b, c) {
var d = setTimeout(b, a);
c.stop = function () {
clearTimeout(d)
}
})
},
clearQueue: function (a) {
return this.queue(a || "fx", [])
},
promise: function (a, c) {
function d() {
--i || f.resolveWith(g, [g])
}
"string" != typeof a && (c = a, a = b), a = a || "fx";
for (var e, f = K.Deferred(), g = this, h = g.length, i = 1, j = a + "defer", k = a + "queue", l = a + "mark"; h--;)(e = K.data(g[h], j, b, !0) || (K.data(g[h], k, b, !0) || K.data(g[h], l, b, !0)) && K.data(g[h], j, K.Callbacks("once memory"), !0)) && (i++, e.add(d));
return d(), f.promise()
}
});
var P, Q, R, S = /[\n\t\r]/g,
T = /\s+/,
U = /\r/g,
V = /^(?:button|input)$/i,
W = /^(?:button|input|object|select|textarea)$/i,
X = /^a(?:rea)?$/i,
Y = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
Z = K.support.getSetAttribute;
K.fn.extend({
attr: function (a, b) {
return K.access(this, a, b, !0, K.attr)
},
removeAttr: function (a) {
return this.each(function () {
K.removeAttr(this, a)
})
},
prop: function (a, b) {
return K.access(this, a, b, !0, K.prop)
},
removeProp: function (a) {
return a = K.propFix[a] || a, this.each(function () {
try {
this[a] = b, delete this[a]
} catch (c) {}
})
},
addClass: function (a) {
var b, c, d, e, f, g, h;
if (K.isFunction(a)) return this.each(function (b) {
K(this).addClass(a.call(this, b, this.className))
});
if (a && "string" == typeof a)
for (b = a.split(T), c = 0, d = this.length; d > c; c++)
if (e = this[c], 1 === e.nodeType)
if (e.className || 1 !== b.length) {
for (f = " " + e.className + " ", g = 0, h = b.length; h > g; g++)~ f.indexOf(" " + b[g] + " ") || (f += b[g] + " ");
e.className = K.trim(f)
} else e.className = a;
return this
},
removeClass: function (a) {
var c, d, e, f, g, h, i;
if (K.isFunction(a)) return this.each(function (b) {
K(this).removeClass(a.call(this, b, this.className))
});
if (a && "string" == typeof a || a === b)
for (c = (a || "").split(T), d = 0, e = this.length; e > d; d++)
if (f = this[d], 1 === f.nodeType && f.className)
if (a) {
for (g = (" " + f.className + " ").replace(S, " "), h = 0, i = c.length; i > h; h++) g = g.replace(" " + c[h] + " ", " ");
f.className = K.trim(g)
} else f.className = "";
return this
},
toggleClass: function (a, b) {
var c = typeof a,
d = "boolean" == typeof b;
return K.isFunction(a) ? this.each(function (c) {
K(this).toggleClass(a.call(this, c, this.className, b), b)
}) : this.each(function () {
if ("string" === c)
for (var e, f = 0, g = K(this), h = b, i = a.split(T); e = i[f++];) h = d ? h : !g.hasClass(e), g[h ? "addClass" : "removeClass"](e);
else("undefined" === c || "boolean" === c) && (this.className && K._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : K._data(this, "__className__") || "")
})
},
hasClass: function (a) {
for (var b = " " + a + " ", c = 0, d = this.length; d > c; c++)
if (1 === this[c].nodeType && (" " + this[c].className + " ").replace(S, " ").indexOf(b) > -1) return !0;
return !1
},
val: function (a) {
var c, d, e, f = this[0]; {
if (arguments.length) return e = K.isFunction(a), this.each(function (d) {
var f, g = K(this);
1 === this.nodeType && (f = e ? a.call(this, d, g.val()) : a, null == f ? f = "" : "number" == typeof f ? f += "" : K.isArray(f) && (f = K.map(f, function (a) {
return null == a ? "" : a + ""
})), c = K.valHooks[this.nodeName.toLowerCase()] || K.valHooks[this.type], c && "set" in c && c.set(this, f, "value") !== b || (this.value = f))
});
if (f) return c = K.valHooks[f.nodeName.toLowerCase()] || K.valHooks[f.type], c && "get" in c && (d = c.get(f, "value")) !== b ? d : (d = f.value, "string" == typeof d ? d.replace(U, "") : null == d ? "" : d)
}
}
}), K.extend({
valHooks: {
option: {
get: function (a) {
var b = a.attributes.value;
return !b || b.specified ? a.value : a.text
}
},
select: {
get: function (a) {
var b, c, d, e, f = a.selectedIndex,
g = [],
h = a.options,
i = "select-one" === a.type;
if (0 > f) return null;
for (c = i ? f : 0, d = i ? f + 1 : h.length; d > c; c++)
if (e = h[c], !(!e.selected || (K.support.optDisabled ? e.disabled : null !== e.getAttribute("disabled")) || e.parentNode.disabled && K.nodeName(e.parentNode, "optgroup"))) {
if (b = K(e).val(), i) return b;
g.push(b)
}
return i && !g.length && h.length ? K(h[f]).val() : g
},
set: function (a, b) {
var c = K.makeArray(b);
return K(a).find("option").each(function () {
this.selected = K.inArray(K(this).val(), c) >= 0
}), c.length || (a.selectedIndex = -1), c
}
}
},
attrFn: {
val: !0,
css: !0,
html: !0,
text: !0,
data: !0,
width: !0,
height: !0,
offset: !0
},
attr: function (a, c, d, e) {
var f, g, h, i = a.nodeType;
if (a && 3 !== i && 8 !== i && 2 !== i) return e && c in K.attrFn ? K(a)[c](d) : "undefined" == typeof a.getAttribute ? K.prop(a, c, d) : (h = 1 !== i || !K.isXMLDoc(a), h && (c = c.toLowerCase(), g = K.attrHooks[c] || (Y.test(c) ? Q : P)), d !== b ? null === d ? (K.removeAttr(a, c), void 0) : g && "set" in g && h && (f = g.set(a, d, c)) !== b ? f : (a.setAttribute(c, "" + d), d) : g && "get" in g && h && null !== (f = g.get(a, c)) ? f : (f = a.getAttribute(c), null === f ? b : f))
},
removeAttr: function (a, b) {
var c, d, e, f, g = 0;
if (b && 1 === a.nodeType)
for (d = b.toLowerCase().split(T), f = d.length; f > g; g++) e = d[g], e && (c = K.propFix[e] || e, K.attr(a, e, ""), a.removeAttribute(Z ? e : c), Y.test(e) && c in a && (a[c] = !1))
},
attrHooks: {
type: {
set: function (a, b) {
if (V.test(a.nodeName) && a.parentNode) K.error("type property can't be changed");
else if (!K.support.radioValue && "radio" === b && K.nodeName(a, "input")) {
var c = a.value;
return a.setAttribute("type", b), c && (a.value = c), b
}
}
},
value: {
get: function (a, b) {
return P && K.nodeName(a, "button") ? P.get(a, b) : b in a ? a.value : null
},
set: function (a, b, c) {
return P && K.nodeName(a, "button") ? P.set(a, b, c) : (a.value = b, void 0)
}
}
},
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
},
prop: function (a, c, d) {
var e, f, g, h = a.nodeType;
if (a && 3 !== h && 8 !== h && 2 !== h) return g = 1 !== h || !K.isXMLDoc(a), g && (c = K.propFix[c] || c, f = K.propHooks[c]), d !== b ? f && "set" in f && (e = f.set(a, d, c)) !== b ? e : a[c] = d : f && "get" in f && null !== (e = f.get(a, c)) ? e : a[c]
},
propHooks: {
tabIndex: {
get: function (a) {
var c = a.getAttributeNode("tabindex");
return c && c.specified ? parseInt(c.value, 10) : W.test(a.nodeName) || X.test(a.nodeName) && a.href ? 0 : b
}
}
}
}), K.attrHooks.tabindex = K.propHooks.tabIndex, Q = {
get: function (a, c) {
var d, e = K.prop(a, c);
return e === !0 || "boolean" != typeof e && (d = a.getAttributeNode(c)) && d.nodeValue !== !1 ? c.toLowerCase() : b
},
set: function (a, b, c) {
var d;
return b === !1 ? K.removeAttr(a, c) : (d = K.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase())), c
}
}, Z || (R = {
name: !0,
id: !0
}, P = K.valHooks.button = {
get: function (a, c) {
var d;
return d = a.getAttributeNode(c), d && (R[c] ? "" !== d.nodeValue : d.specified) ? d.nodeValue : b
},
set: function (a, b, c) {
var d = a.getAttributeNode(c);
return d || (d = H.createAttribute(c), a.setAttributeNode(d)), d.nodeValue = b + ""
}
}, K.attrHooks.tabindex.set = P.set, K.each(["width", "height"], function (a, b) {
K.attrHooks[b] = K.extend(K.attrHooks[b], {
set: function (a, c) {
return "" === c ? (a.setAttribute(b, "auto"), c) : void 0
}
})
}), K.attrHooks.contenteditable = {
get: P.get,
set: function (a, b, c) {
"" === b && (b = "false"), P.set(a, b, c)
}
}), K.support.hrefNormalized || K.each(["href", "src", "width", "height"], function (a, c) {
K.attrHooks[c] = K.extend(K.attrHooks[c], {
get: function (a) {
var d = a.getAttribute(c, 2);
return null === d ? b : d
}
})
}), K.support.style || (K.attrHooks.style = {
get: function (a) {
return a.style.cssText.toLowerCase() || b
},
set: function (a, b) {
return a.style.cssText = "" + b
}
}), K.support.optSelected || (K.propHooks.selected = K.extend(K.propHooks.selected, {
get: function (a) {
var b = a.parentNode;
return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null
}
})), K.support.enctype || (K.propFix.enctype = "encoding"), K.support.checkOn || K.each(["radio", "checkbox"], function () {
K.valHooks[this] = {
get: function (a) {
return null === a.getAttribute("value") ? "on" : a.value
}
}
}), K.each(["radio", "checkbox"], function () {
K.valHooks[this] = K.extend(K.valHooks[this], {
set: function (a, b) {
return K.isArray(b) ? a.checked = K.inArray(K(a).val(), b) >= 0 : void 0
}
})
});
var $ = /^(?:textarea|input|select)$/i,
_ = /^([^\.]*)?(?:\.(.+))?$/,
ab = /\bhover(\.\S+)?\b/,
bb = /^key/,
cb = /^(?:mouse|contextmenu)|click/,
db = /^(?:focusinfocus|focusoutblur)$/,
eb = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
fb = function (a) {
var b = eb.exec(a);
return b && (b[1] = (b[1] || "").toLowerCase(), b[3] = b[3] && new RegExp("(?:^|\\s)" + b[3] + "(?:\\s|$)")), b
}, gb = function (a, b) {
var c = a.attributes || {};
return !(b[1] && a.nodeName.toLowerCase() !== b[1] || b[2] && (c.id || {}).value !== b[2] || b[3] && !b[3].test((c["class"] || {}).value))
}, hb = function (a) {
return K.event.special.hover ? a : a.replace(ab, "mouseenter$1 mouseleave$1")
};
K.event = {
add: function (a, c, d, e, f) {
var g, h, i, j, k, l, m, n, o, p, q;
if (3 !== a.nodeType && 8 !== a.nodeType && c && d && (g = K._data(a))) {
for (d.handler && (o = d, d = o.handler), d.guid || (d.guid = K.guid++), i = g.events, i || (g.events = i = {}), h = g.handle, h || (g.handle = h = function (a) {
return "undefined" == typeof K || a && K.event.triggered === a.type ? b : K.event.dispatch.apply(h.elem, arguments)
}, h.elem = a), c = K.trim(hb(c)).split(" "), j = 0; j < c.length; j++) k = _.exec(c[j]) || [], l = k[1], m = (k[2] || "").split(".").sort(), q = K.event.special[l] || {}, l = (f ? q.delegateType : q.bindType) || l, q = K.event.special[l] || {}, n = K.extend({
type: l,
origType: k[1],
data: e,
handler: d,
guid: d.guid,
selector: f,
quick: fb(f),
namespace: m.join(".")
}, o), p = i[l], p || (p = i[l] = [], p.delegateCount = 0, q.setup && q.setup.call(a, e, m, h) !== !1 || (a.addEventListener ? a.addEventListener(l, h, !1) : a.attachEvent && a.attachEvent("on" + l, h))), q.add && (q.add.call(a, n), n.handler.guid || (n.handler.guid = d.guid)), f ? p.splice(p.delegateCount++, 0, n) : p.push(n), K.event.global[l] = !0;
a = null
}
},
global: {},
remove: function (a, b, c, d, e) {
var f, g, h, i, j, k, l, m, n, o, p, q, r = K.hasData(a) && K._data(a);
if (r && (m = r.events)) {
for (b = K.trim(hb(b || "")).split(" "), f = 0; f < b.length; f++)
if (g = _.exec(b[f]) || [], h = i = g[1], j = g[2], h) {
for (n = K.event.special[h] || {}, h = (d ? n.delegateType : n.bindType) || h, p = m[h] || [], k = p.length, j = j ? new RegExp("(^|\\.)" + j.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null, l = 0; l < p.length; l++) q = p[l], !e && i !== q.origType || c && c.guid !== q.guid || j && !j.test(q.namespace) || d && d !== q.selector && ("**" !== d || !q.selector) || (p.splice(l--, 1), q.selector && p.delegateCount--, n.remove && n.remove.call(a, q));
0 === p.length && k !== p.length && (n.teardown && n.teardown.call(a, j) !== !1 || K.removeEvent(a, h, r.handle), delete m[h])
} else
for (h in m) K.event.remove(a, h + b[f], c, d, !0);
K.isEmptyObject(m) && (o = r.handle, o && (o.elem = null), K.removeData(a, ["events", "handle"], !0))
}
},
customEvent: {
getData: !0,
setData: !0,
changeData: !0
},
trigger: function (c, d, e, f) {
if (!e || 3 !== e.nodeType && 8 !== e.nodeType) {
var g, h, i, j, k, l, m, n, o, p, q = c.type || c,
r = [];
if (!db.test(q + K.event.triggered) && (q.indexOf("!") >= 0 && (q = q.slice(0, -1), h = !0), q.indexOf(".") >= 0 && (r = q.split("."), q = r.shift(), r.sort()), e && !K.event.customEvent[q] || K.event.global[q]))
if (c = "object" == typeof c ? c[K.expando] ? c : new K.Event(q, c) : new K.Event(q), c.type = q, c.isTrigger = !0, c.exclusive = h, c.namespace = r.join("."), c.namespace_re = c.namespace ? new RegExp("(^|\\.)" + r.join("\\.(?:.*\\.)?") + "(\\.|$)") : null, l = q.indexOf(":") < 0 ? "on" + q : "", e) {
if (c.result = b, c.target || (c.target = e), d = null != d ? K.makeArray(d) : [], d.unshift(c), m = K.event.special[q] || {}, !m.trigger || m.trigger.apply(e, d) !== !1) {
if (o = [
[e, m.bindType || q]
], !f && !m.noBubble && !K.isWindow(e)) {
for (p = m.delegateType || q, j = db.test(p + q) ? e : e.parentNode, k = null; j; j = j.parentNode) o.push([j, p]), k = j;
k && k === e.ownerDocument && o.push([k.defaultView || k.parentWindow || a, p])
}
for (i = 0; i < o.length && !c.isPropagationStopped(); i++) j = o[i][0], c.type = o[i][1], n = (K._data(j, "events") || {})[c.type] && K._data(j, "handle"), n && n.apply(j, d), n = l && j[l], n && K.acceptData(j) && n.apply(j, d) === !1 && c.preventDefault();
return c.type = q, f || c.isDefaultPrevented() || m._default && m._default.apply(e.ownerDocument, d) !== !1 || "click" === q && K.nodeName(e, "a") || !K.acceptData(e) || l && e[q] && ("focus" !== q && "blur" !== q || 0 !== c.target.offsetWidth) && !K.isWindow(e) && (k = e[l], k && (e[l] = null), K.event.triggered = q, e[q](), K.event.triggered = b, k && (e[l] = k)), c.result
}
} else {
g = K.cache;
for (i in g) g[i].events && g[i].events[q] && K.event.trigger(c, d, g[i].handle.elem, !0)
}
}
},
dispatch: function (c) {
c = K.event.fix(c || a.event);
var d, e, f, g, h, i, j, k, l, m, n = (K._data(this, "events") || {})[c.type] || [],
o = n.delegateCount,
p = [].slice.call(arguments, 0),
q = !c.exclusive && !c.namespace,
r = [];
if (p[0] = c, c.delegateTarget = this, o && !c.target.disabled && (!c.button || "click" !== c.type))
for (g = K(this), g.context = this.ownerDocument || this, f = c.target; f != this; f = f.parentNode || this) {
for (i = {}, k = [], g[0] = f, d = 0; o > d; d++) l = n[d], m = l.selector, i[m] === b && (i[m] = l.quick ? gb(f, l.quick) : g.is(m)), i[m] && k.push(l);
k.length && r.push({
elem: f,
matches: k
})
}
for (n.length > o && r.push({
elem: this,
matches: n.slice(o)
}), d = 0; d < r.length && !c.isPropagationStopped(); d++)
for (j = r[d], c.currentTarget = j.elem, e = 0; e < j.matches.length && !c.isImmediatePropagationStopped(); e++) l = j.matches[e], (q || !c.namespace && !l.namespace || c.namespace_re && c.namespace_re.test(l.namespace)) && (c.data = l.data, c.handleObj = l, h = ((K.event.special[l.origType] || {}).handle || l.handler).apply(j.elem, p), h !== b && (c.result = h, h === !1 && (c.preventDefault(), c.stopPropagation())));
return c.result
},
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function (a, b) {
return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function (a, c) {
var d, e, f, g = c.button,
h = c.fromElement;
return null == a.pageX && null != c.clientX && (d = a.target.ownerDocument || H, e = d.documentElement, f = d.body, a.pageX = c.clientX + (e && e.scrollLeft || f && f.scrollLeft || 0) - (e && e.clientLeft || f && f.clientLeft || 0), a.pageY = c.clientY + (e && e.scrollTop || f && f.scrollTop || 0) - (e && e.clientTop || f && f.clientTop || 0)), !a.relatedTarget && h && (a.relatedTarget = h === a.target ? c.toElement : h), a.which || g === b || (a.which = 1 & g ? 1 : 2 & g ? 3 : 4 & g ? 2 : 0), a
}
},
fix: function (a) {
if (a[K.expando]) return a;
var c, d, e = a,
f = K.event.fixHooks[a.type] || {}, g = f.props ? this.props.concat(f.props) : this.props;
for (a = K.Event(e), c = g.length; c;) d = g[--c], a[d] = e[d];
return a.target || (a.target = e.srcElement || H), 3 === a.target.nodeType && (a.target = a.target.parentNode), a.metaKey === b && (a.metaKey = a.ctrlKey), f.filter ? f.filter(a, e) : a
},
special: {
ready: {
setup: K.bindReady
},
load: {
noBubble: !0
},
focus: {
delegateType: "focusin"
},
blur: {
delegateType: "focusout"
},
beforeunload: {
setup: function (a, b, c) {
K.isWindow(this) && (this.onbeforeunload = c)
},
teardown: function (a, b) {
this.onbeforeunload === b && (this.onbeforeunload = null)
}
}
},
simulate: function (a, b, c, d) {
var e = K.extend(new K.Event, c, {
type: a,
isSimulated: !0,
originalEvent: {}
});
d ? K.event.trigger(e, null, b) : K.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault()
}
}, K.event.handle = K.event.dispatch, K.removeEvent = H.removeEventListener ? function (a, b, c) {
a.removeEventListener && a.removeEventListener(b, c, !1)
} : function (a, b, c) {
a.detachEvent && a.detachEvent("on" + b, c)
}, K.Event = function (a, b) {
return this instanceof K.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? h : g) : this.type = a, b && K.extend(this, b), this.timeStamp = a && a.timeStamp || K.now(), this[K.expando] = !0, void 0) : new K.Event(a, b)
}, K.Event.prototype = {
preventDefault: function () {
this.isDefaultPrevented = h;
var a = this.originalEvent;
a && (a.preventDefault ? a.preventDefault() : a.returnValue = !1)
},
stopPropagation: function () {
this.isPropagationStopped = h;
var a = this.originalEvent;
a && (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0)
},
stopImmediatePropagation: function () {
this.isImmediatePropagationStopped = h, this.stopPropagation()
},
isDefaultPrevented: g,
isPropagationStopped: g,
isImmediatePropagationStopped: g
}, K.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function (a, b) {
K.event.special[a] = {
delegateType: b,
bindType: b,
handle: function (a) {
var c, d = this,
e = a.relatedTarget,
f = a.handleObj;
return f.selector, (!e || e !== d && !K.contains(d, e)) && (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c
}
}
}), K.support.submitBubbles || (K.event.special.submit = {
setup: function () {
return K.nodeName(this, "form") ? !1 : (K.event.add(this, "click._submit keypress._submit", function (a) {
var c = a.target,
d = K.nodeName(c, "input") || K.nodeName(c, "button") ? c.form : b;
d && !d._submit_attached && (K.event.add(d, "submit._submit", function (a) {
this.parentNode && !a.isTrigger && K.event.simulate("submit", this.parentNode, a, !0)
}), d._submit_attached = !0)
}), void 0)
},
teardown: function () {
return K.nodeName(this, "form") ? !1 : (K.event.remove(this, "._submit"), void 0)
}
}), K.support.changeBubbles || (K.event.special.change = {
setup: function () {
return $.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (K.event.add(this, "propertychange._change", function (a) {
"checked" === a.originalEvent.propertyName && (this._just_changed = !0)
}), K.event.add(this, "click._change", function (a) {
this._just_changed && !a.isTrigger && (this._just_changed = !1, K.event.simulate("change", this, a, !0))
})), !1) : (K.event.add(this, "beforeactivate._change", function (a) {
var b = a.target;
$.test(b.nodeName) && !b._change_attached && (K.event.add(b, "change._change", function (a) {
!this.parentNode || a.isSimulated || a.isTrigger || K.event.simulate("change", this.parentNode, a, !0)
}), b._change_attached = !0)
}), void 0)
},
handle: function (a) {
var b = a.target;
return this !== b || a.isSimulated || a.isTrigger || "radio" !== b.type && "checkbox" !== b.type ? a.handleObj.handler.apply(this, arguments) : void 0
},
teardown: function () {
return K.event.remove(this, "._change"), $.test(this.nodeName)
}
}), K.support.focusinBubbles || K.each({
focus: "focusin",
blur: "focusout"
}, function (a, b) {
var c = 0,
d = function (a) {
K.event.simulate(b, a.target, K.event.fix(a), !0)
};
K.event.special[b] = {
setup: function () {
0 === c++ && H.addEventListener(a, d, !0)
},
teardown: function () {
0 === --c && H.removeEventListener(a, d, !0)
}
}
}), K.fn.extend({
on: function (a, c, d, e, f) {
var h, i;
if ("object" == typeof a) {
"string" != typeof c && (d = c, c = b);
for (i in a) this.on(i, c, d, a[i], f);
return this
}
if (null == d && null == e ? (e = c, d = c = b) : null == e && ("string" == typeof c ? (e = d, d = b) : (e = d, d = c, c = b)), e === !1) e = g;
else if (!e) return this;
return 1 === f && (h = e, e = function (a) {
return K().off(a), h.apply(this, arguments)
}, e.guid = h.guid || (h.guid = K.guid++)), this.each(function () {
K.event.add(this, a, e, d, c)
})
},
one: function (a, b, c, d) {
return this.on.call(this, a, b, c, d, 1)
},
off: function (a, c, d) {
if (a && a.preventDefault && a.handleObj) {
var e = a.handleObj;
return K(a.delegateTarget).off(e.namespace ? e.type + "." + e.namespace : e.type, e.selector, e.handler), this
}
if ("object" == typeof a) {
for (var f in a) this.off(f, c, a[f]);
return this
}
return (c === !1 || "function" == typeof c) && (d = c, c = b), d === !1 && (d = g), this.each(function () {
K.event.remove(this, a, d, c)
})
},
bind: function (a, b, c) {
return this.on(a, null, b, c)
},
unbind: function (a, b) {
return this.off(a, null, b)
},
live: function (a, b, c) {
return K(this.context).on(a, this.selector, b, c), this
},
die: function (a, b) {
return K(this.context).off(a, this.selector || "**", b), this
},
delegate: function (a, b, c, d) {
return this.on(b, a, c, d)
},
undelegate: function (a, b, c) {
return 1 == arguments.length ? this.off(a, "**") : this.off(b, a, c)
},
trigger: function (a, b) {
return this.each(function () {
K.event.trigger(a, b, this)
})
},
triggerHandler: function (a, b) {
return this[0] ? K.event.trigger(a, b, this[0], !0) : void 0
},
toggle: function (a) {
var b = arguments,
c = a.guid || K.guid++,
d = 0,
e = function (c) {
var e = (K._data(this, "lastToggle" + a.guid) || 0) % d;
return K._data(this, "lastToggle" + a.guid, e + 1), c.preventDefault(), b[e].apply(this, arguments) || !1
};
for (e.guid = c; d < b.length;) b[d++].guid = c;
return this.click(e)
},
hover: function (a, b) {
return this.mouseenter(a).mouseleave(b || a)
}
}), K.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (a, b) {
K.fn[b] = function (a, c) {
return null == c && (c = a, a = null), arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b)
}, K.attrFn && (K.attrFn[b] = !0), bb.test(b) && (K.event.fixHooks[b] = K.event.keyHooks), cb.test(b) && (K.event.fixHooks[b] = K.event.mouseHooks)
}),
function () {
function a(a, b, c, d, f, g) {
for (var h = 0, i = d.length; i > h; h++) {
var j = d[h];
if (j) {
var k = !1;
for (j = j[a]; j;) {
if (j[e] === c) {
k = d[j.sizset];
break
}
if (1 !== j.nodeType || g || (j[e] = c, j.sizset = h), j.nodeName.toLowerCase() === b) {
k = j;
break
}
j = j[a]
}
d[h] = k
}
}
}

function c(a, b, c, d, f, g) {
for (var h = 0, i = d.length; i > h; h++) {
var j = d[h];
if (j) {
var k = !1;
for (j = j[a]; j;) {
if (j[e] === c) {
k = d[j.sizset];
break
}
if (1 === j.nodeType)
if (g || (j[e] = c, j.sizset = h), "string" != typeof b) {
if (j === b) {
k = !0;
break
}
} else if (m.filter(b, [j]).length > 0) {
k = j;
break
}
j = j[a]
}
d[h] = k
}
}
}
var d = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e = "sizcache" + (Math.random() + "").replace(".", ""),
f = 0,
g = Object.prototype.toString,
h = !1,
i = !0,
j = /\\/g,
k = /\r\n/g,
l = /\W/;
[0, 0].sort(function () {
return i = !1, 0
});
var m = function (a, b, c, e) {
c = c || [], b = b || H;
var f = b;
if (1 !== b.nodeType && 9 !== b.nodeType) return [];
if (!a || "string" != typeof a) return c;
var h, i, j, k, l, n, q, r, t = !0,
u = m.isXML(b),
v = [],
x = a;
do
if (d.exec(""), h = d.exec(x), h && (x = h[3], v.push(h[1]), h[2])) {
k = h[3];
break
} while (h);
if (v.length > 1 && p.exec(a))
if (2 === v.length && o.relative[v[0]]) i = w(v[0] + v[1], b, e);
else
for (i = o.relative[v[0]] ? [b] : m(v.shift(), b); v.length;) a = v.shift(), o.relative[a] && (a += v.shift()), i = w(a, i, e);
else if (!e && v.length > 1 && 9 === b.nodeType && !u && o.match.ID.test(v[0]) && !o.match.ID.test(v[v.length - 1]) && (l = m.find(v.shift(), b, u), b = l.expr ? m.filter(l.expr, l.set)[0] : l.set[0]), b)
for (l = e ? {
expr: v.pop(),
set: s(e)
} : m.find(v.pop(), 1 !== v.length || "~" !== v[0] && "+" !== v[0] || !b.parentNode ? b : b.parentNode, u), i = l.expr ? m.filter(l.expr, l.set) : l.set, v.length > 0 ? j = s(i) : t = !1; v.length;) n = v.pop(), q = n, o.relative[n] ? q = v.pop() : n = "", null == q && (q = b), o.relative[n](j, q, u);
else j = v = []; if (j || (j = i), j || m.error(n || a), "[object Array]" === g.call(j))
if (t)
if (b && 1 === b.nodeType)
for (r = 0; null != j[r]; r++) j[r] && (j[r] === !0 || 1 === j[r].nodeType && m.contains(b, j[r])) && c.push(i[r]);
else
for (r = 0; null != j[r]; r++) j[r] && 1 === j[r].nodeType && c.push(i[r]);
else c.push.apply(c, j);
else s(j, c);
return k && (m(k, f, c, e), m.uniqueSort(c)), c
};
m.uniqueSort = function (a) {
if (u && (h = i, a.sort(u), h))
for (var b = 1; b < a.length; b++) a[b] === a[b - 1] && a.splice(b--, 1);
return a
}, m.matches = function (a, b) {
return m(a, null, null, b)
}, m.matchesSelector = function (a, b) {
return m(b, null, null, [a]).length > 0
}, m.find = function (a, b, c) {
var d, e, f, g, h, i;
if (!a) return [];
for (e = 0, f = o.order.length; f > e; e++)
if (h = o.order[e], (g = o.leftMatch[h].exec(a)) && (i = g[1], g.splice(1, 1), "\\" !== i.substr(i.length - 1) && (g[1] = (g[1] || "").replace(j, ""), d = o.find[h](g, b, c), null != d))) {
a = a.replace(o.match[h], "");
break
}
return d || (d = "undefined" != typeof b.getElementsByTagName ? b.getElementsByTagName("*") : []), {
set: d,
expr: a
}
}, m.filter = function (a, c, d, e) {
for (var f, g, h, i, j, k, l, n, p, q = a, r = [], s = c, t = c && c[0] && m.isXML(c[0]); a && c.length;) {
for (h in o.filter)
if (null != (f = o.leftMatch[h].exec(a)) && f[2]) {
if (k = o.filter[h], l = f[1], g = !1, f.splice(1, 1), "\\" === l.substr(l.length - 1)) continue;
if (s === r && (r = []), o.preFilter[h])
if (f = o.preFilter[h](f, s, d, r, e, t)) {
if (f === !0) continue
} else g = i = !0;
if (f)
for (n = 0; null != (j = s[n]); n++) j && (i = k(j, f, n, s), p = e ^ i, d && null != i ? p ? g = !0 : s[n] = !1 : p && (r.push(j), g = !0));
if (i !== b) {
if (d || (s = r), a = a.replace(o.match[h], ""), !g) return [];
break
}
}
if (a === q) {
if (null != g) break;
m.error(a)
}
q = a
}
return s
}, m.error = function (a) {
throw new Error("Syntax error, unrecognized expression: " + a)
};
var n = m.getText = function (a) {
var b, c, d = a.nodeType,
e = "";
if (d) {
if (1 === d || 9 === d) {
if ("string" == typeof a.textContent) return a.textContent;
if ("string" == typeof a.innerText) return a.innerText.replace(k, "");
for (a = a.firstChild; a; a = a.nextSibling) e += n(a)
} else if (3 === d || 4 === d) return a.nodeValue
} else
for (b = 0; c = a[b]; b++) 8 !== c.nodeType && (e += n(c));
return e
}, o = m.selectors = {
order: ["ID", "NAME", "TAG"],
match: {
ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
leftMatch: {},
attrMap: {
"class": "className",
"for": "htmlFor"
},
attrHandle: {
href: function (a) {
return a.getAttribute("href")
},
type: function (a) {
return a.getAttribute("type")
}
},
relative: {
"+": function (a, b) {
var c = "string" == typeof b,
d = c && !l.test(b),
e = c && !d;
d && (b = b.toLowerCase());
for (var f, g = 0, h = a.length; h > g; g++)
if (f = a[g]) {
for (;
(f = f.previousSibling) && 1 !== f.nodeType;);
a[g] = e || f && f.nodeName.toLowerCase() === b ? f || !1 : f === b
}
e && m.filter(b, a, !0)
},
">": function (a, b) {
var c, d = "string" == typeof b,
e = 0,
f = a.length;
if (d && !l.test(b)) {
for (b = b.toLowerCase(); f > e; e++)
if (c = a[e]) {
var g = c.parentNode;
a[e] = g.nodeName.toLowerCase() === b ? g : !1
}
} else {
for (; f > e; e++) c = a[e], c && (a[e] = d ? c.parentNode : c.parentNode === b);
d && m.filter(b, a, !0)
}
},
"": function (b, d, e) {
var g, h = f++,
i = c;
"string" != typeof d || l.test(d) || (d = d.toLowerCase(), g = d, i = a), i("parentNode", d, h, b, g, e)
},
"~": function (b, d, e) {
var g, h = f++,
i = c;
"string" != typeof d || l.test(d) || (d = d.toLowerCase(), g = d, i = a), i("previousSibling", d, h, b, g, e)
}
},
find: {
ID: function (a, b, c) {
if ("undefined" != typeof b.getElementById && !c) {
var d = b.getElementById(a[1]);
return d && d.parentNode ? [d] : []
}
},
NAME: function (a, b) {
if ("undefined" != typeof b.getElementsByName) {
for (var c = [], d = b.getElementsByName(a[1]), e = 0, f = d.length; f > e; e++) d[e].getAttribute("name") === a[1] && c.push(d[e]);
return 0 === c.length ? null : c
}
},
TAG: function (a, b) {
return "undefined" != typeof b.getElementsByTagName ? b.getElementsByTagName(a[1]) : void 0
}
},
preFilter: {
CLASS: function (a, b, c, d, e, f) {
if (a = " " + a[1].replace(j, "") + " ", f) return a;
for (var g, h = 0; null != (g = b[h]); h++) g && (e ^ (g.className && (" " + g.className + " ").replace(/[\t\n\r]/g, " ").indexOf(a) >= 0) ? c || d.push(g) : c && (b[h] = !1));
return !1
},
ID: function (a) {
return a[1].replace(j, "")
},
TAG: function (a) {
return a[1].replace(j, "").toLowerCase()
},
CHILD: function (a) {
if ("nth" === a[1]) {
a[2] || m.error(a[0]), a[2] = a[2].replace(/^\+|\s*/g, "");
var b = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even" === a[2] && "2n" || "odd" === a[2] && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]);
a[2] = b[1] + (b[2] || 1) - 0, a[3] = b[3] - 0
} else a[2] && m.error(a[0]);
return a[0] = f++, a
},
ATTR: function (a, b, c, d, e, f) {
var g = a[1] = a[1].replace(j, "");
return !f && o.attrMap[g] && (a[1] = o.attrMap[g]), a[4] = (a[4] || a[5] || "").replace(j, ""), "~=" === a[2] && (a[4] = " " + a[4] + " "), a
},
PSEUDO: function (a, b, c, e, f) {
if ("not" === a[1]) {
if (!((d.exec(a[3]) || "").length > 1 || /^\w/.test(a[3]))) {
var g = m.filter(a[3], b, c, !0 ^ f);
return c || e.push.apply(e, g), !1
}
a[3] = m(a[3], null, null, b)
} else if (o.match.POS.test(a[0]) || o.match.CHILD.test(a[0])) return !0;
return a
},
POS: function (a) {
return a.unshift(!0), a
}
},
filters: {
enabled: function (a) {
return a.disabled === !1 && "hidden" !== a.type
},
disabled: function (a) {
return a.disabled === !0
},
checked: function (a) {
return a.checked === !0
},
selected: function (a) {
return a.parentNode && a.parentNode.selectedIndex, a.selected === !0
},
parent: function (a) {
return !!a.firstChild
},
empty: function (a) {
return !a.firstChild
},
has: function (a, b, c) {
return !!m(c[3], a).length
},
header: function (a) {
return /h\d/i.test(a.nodeName)
},
text: function (a) {
var b = a.getAttribute("type"),
c = a.type;
return "input" === a.nodeName.toLowerCase() && "text" === c && (b === c || null === b)
},
radio: function (a) {
return "input" === a.nodeName.toLowerCase() && "radio" === a.type
},
checkbox: function (a) {
return "input" === a.nodeName.toLowerCase() && "checkbox" === a.type
},
file: function (a) {
return "input" === a.nodeName.toLowerCase() && "file" === a.type
},
password: function (a) {
return "input" === a.nodeName.toLowerCase() && "password" === a.type
},
submit: function (a) {
var b = a.nodeName.toLowerCase();
return ("input" === b || "button" === b) && "submit" === a.type
},
image: function (a) {
return "input" === a.nodeName.toLowerCase() && "image" === a.type
},
reset: function (a) {
var b = a.nodeName.toLowerCase();
return ("input" === b || "button" === b) && "reset" === a.type
},
button: function (a) {
var b = a.nodeName.toLowerCase();
return "input" === b && "button" === a.type || "button" === b
},
input: function (a) {
return /input|select|textarea|button/i.test(a.nodeName)
},
focus: function (a) {
return a === a.ownerDocument.activeElement
}
},
setFilters: {
first: function (a, b) {
return 0 === b
},
last: function (a, b, c, d) {
return b === d.length - 1
},
even: function (a, b) {
return 0 === b % 2
},
odd: function (a, b) {
return 1 === b % 2
},
lt: function (a, b, c) {
return b < c[3] - 0
},
gt: function (a, b, c) {
return b > c[3] - 0
},
nth: function (a, b, c) {
return c[3] - 0 === b
},
eq: function (a, b, c) {
return c[3] - 0 === b
}
},
filter: {
PSEUDO: function (a, b, c, d) {
var e = b[1],
f = o.filters[e];
if (f) return f(a, c, b, d);
if ("contains" === e) return (a.textContent || a.innerText || n([a]) || "").indexOf(b[3]) >= 0;
if ("not" === e) {
for (var g = b[3], h = 0, i = g.length; i > h; h++)
if (g[h] === a) return !1;
return !0
}
m.error(e)
},
CHILD: function (a, b) {
var c, d, f, g, h, i, j = b[1],
k = a;
switch (j) {
case "only":
case "first":
for (; k = k.previousSibling;)
if (1 === k.nodeType) return !1;
if ("first" === j) return !0;
k = a;
case "last":
for (; k = k.nextSibling;)
if (1 === k.nodeType) return !1;
return !0;
case "nth":
if (c = b[2], d = b[3], 1 === c && 0 === d) return !0;
if (f = b[0], g = a.parentNode, g && (g[e] !== f || !a.nodeIndex)) {
for (h = 0, k = g.firstChild; k; k = k.nextSibling) 1 === k.nodeType && (k.nodeIndex = ++h);
g[e] = f
}
return i = a.nodeIndex - d, 0 === c ? 0 === i : 0 === i % c && i / c >= 0
}
},
ID: function (a, b) {
return 1 === a.nodeType && a.getAttribute("id") === b
},
TAG: function (a, b) {
return "*" === b && 1 === a.nodeType || !! a.nodeName && a.nodeName.toLowerCase() === b
},
CLASS: function (a, b) {
return (" " + (a.className || a.getAttribute("class")) + " ").indexOf(b) > -1
},
ATTR: function (a, b) {
var c = b[1],
d = m.attr ? m.attr(a, c) : o.attrHandle[c] ? o.attrHandle[c](a) : null != a[c] ? a[c] : a.getAttribute(c),
e = d + "",
f = b[2],
g = b[4];
return null == d ? "!=" === f : !f && m.attr ? null != d : "=" === f ? e === g : "*=" === f ? e.indexOf(g) >= 0 : "~=" === f ? (" " + e + " ").indexOf(g) >= 0 : g ? "!=" === f ? e !== g : "^=" === f ? 0 === e.indexOf(g) : "$=" === f ? e.substr(e.length - g.length) === g : "|=" === f ? e === g || e.substr(0, g.length + 1) === g + "-" : !1 : e && d !== !1
},
POS: function (a, b, c, d) {
var e = b[2],
f = o.setFilters[e];
return f ? f(a, c, b, d) : void 0
}
}
}, p = o.match.POS,
q = function (a, b) {
return "\\" + (b - 0 + 1)
};
for (var r in o.match) o.match[r] = new RegExp(o.match[r].source + /(?![^\[]*\])(?![^\(]*\))/.source), o.leftMatch[r] = new RegExp(/(^(?:.|\r|\n)*?)/.source + o.match[r].source.replace(/\\(\d+)/g, q));
var s = function (a, b) {
return a = Array.prototype.slice.call(a, 0), b ? (b.push.apply(b, a), b) : a
};
try {
Array.prototype.slice.call(H.documentElement.childNodes, 0)[0].nodeType
} catch (t) {
s = function (a, b) {
var c = 0,
d = b || [];
if ("[object Array]" === g.call(a)) Array.prototype.push.apply(d, a);
else if ("number" == typeof a.length)
for (var e = a.length; e > c; c++) d.push(a[c]);
else
for (; a[c]; c++) d.push(a[c]);
return d
}
}
var u, v;
H.documentElement.compareDocumentPosition ? u = function (a, b) {
return a === b ? (h = !0, 0) : a.compareDocumentPosition && b.compareDocumentPosition ? 4 & a.compareDocumentPosition(b) ? -1 : 1 : a.compareDocumentPosition ? -1 : 1
} : (u = function (a, b) {
if (a === b) return h = !0, 0;
if (a.sourceIndex && b.sourceIndex) return a.sourceIndex - b.sourceIndex;
var c, d, e = [],
f = [],
g = a.parentNode,
i = b.parentNode,
j = g;
if (g === i) return v(a, b);
if (!g) return -1;
if (!i) return 1;
for (; j;) e.unshift(j), j = j.parentNode;
for (j = i; j;) f.unshift(j), j = j.parentNode;
c = e.length, d = f.length;
for (var k = 0; c > k && d > k; k++)
if (e[k] !== f[k]) return v(e[k], f[k]);
return k === c ? v(a, f[k], -1) : v(e[k], b, 1)
}, v = function (a, b, c) {
if (a === b) return c;
for (var d = a.nextSibling; d;) {
if (d === b) return -1;
d = d.nextSibling
}
return 1
}),
function () {
var a = H.createElement("div"),
c = "script" + (new Date).getTime(),
d = H.documentElement;
a.innerHTML = "<a name='" + c + "'/>", d.insertBefore(a, d.firstChild), H.getElementById(c) && (o.find.ID = function (a, c, d) {
if ("undefined" != typeof c.getElementById && !d) {
var e = c.getElementById(a[1]);
return e ? e.id === a[1] || "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id").nodeValue === a[1] ? [e] : b : []
}
}, o.filter.ID = function (a, b) {
var c = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id");
return 1 === a.nodeType && c && c.nodeValue === b
}), d.removeChild(a), d = a = null
}(),
function () {
var a = H.createElement("div");
a.appendChild(H.createComment("")), a.getElementsByTagName("*").length > 0 && (o.find.TAG = function (a, b) {
var c = b.getElementsByTagName(a[1]);
if ("*" === a[1]) {
for (var d = [], e = 0; c[e]; e++) 1 === c[e].nodeType && d.push(c[e]);
c = d
}
return c
}), a.innerHTML = "<a href='#'></a>", a.firstChild && "undefined" != typeof a.firstChild.getAttribute && "#" !== a.firstChild.getAttribute("href") && (o.attrHandle.href = function (a) {
return a.getAttribute("href", 2)
}), a = null
}(), H.querySelectorAll && function () {
var a = m,
b = H.createElement("div"),
c = "__sizzle__";
if (b.innerHTML = "<p class='TEST'></p>", !b.querySelectorAll || 0 !== b.querySelectorAll(".TEST").length) {
m = function (b, d, e, f) {
if (d = d || H, !f && !m.isXML(d)) {
var g = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);
if (g && (1 === d.nodeType || 9 === d.nodeType)) {
if (g[1]) return s(d.getElementsByTagName(b), e);
if (g[2] && o.find.CLASS && d.getElementsByClassName) return s(d.getElementsByClassName(g[2]), e)
}
if (9 === d.nodeType) {
if ("body" === b && d.body) return s([d.body], e);
if (g && g[3]) {
var h = d.getElementById(g[3]);
if (!h || !h.parentNode) return s([], e);
if (h.id === g[3]) return s([h], e)
}
try {
return s(d.querySelectorAll(b), e)
} catch (i) {}
} else if (1 === d.nodeType && "object" !== d.nodeName.toLowerCase()) {
var j = d,
k = d.getAttribute("id"),
l = k || c,
n = d.parentNode,
p = /^\s*[+~]/.test(b);
k ? l = l.replace(/'/g, "\\$&") : d.setAttribute("id", l), p && n && (d = d.parentNode);
try {
if (!p || n) return s(d.querySelectorAll("[id='" + l + "'] " + b), e)
} catch (q) {} finally {
k || j.removeAttribute("id")
}
}
}
return a(b, d, e, f)
};
for (var d in a) m[d] = a[d];
b = null
}
}(),
function () {
var a = H.documentElement,
b = a.matchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || a.msMatchesSelector;
if (b) {
var c = !b.call(H.createElement("div"), "div"),
d = !1;
try {
b.call(H.documentElement, "[test!='']:sizzle")
} catch (e) {
d = !0
}
m.matchesSelector = function (a, e) {
if (e = e.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"), !m.isXML(a)) try {
if (d || !o.match.PSEUDO.test(e) && !/!=/.test(e)) {
var f = b.call(a, e);
if (f || !c || a.document && 11 !== a.document.nodeType) return f
}
} catch (g) {}
return m(e, null, null, [a]).length > 0
}
}
}(),
function () {
var a = H.createElement("div");
a.innerHTML = "<div class='test e'></div><div class='test'></div>", a.getElementsByClassName && 0 !== a.getElementsByClassName("e").length && (a.lastChild.className = "e", 1 !== a.getElementsByClassName("e").length && (o.order.splice(1, 0, "CLASS"), o.find.CLASS = function (a, b, c) {
return "undefined" == typeof b.getElementsByClassName || c ? void 0 : b.getElementsByClassName(a[1])
}, a = null))
}(), m.contains = H.documentElement.contains ? function (a, b) {
return a !== b && (a.contains ? a.contains(b) : !0)
} : H.documentElement.compareDocumentPosition ? function (a, b) {
return !!(16 & a.compareDocumentPosition(b))
} : function () {
return !1
}, m.isXML = function (a) {
var b = (a ? a.ownerDocument || a : 0).documentElement;
return b ? "HTML" !== b.nodeName : !1
};
var w = function (a, b, c) {
for (var d, e = [], f = "", g = b.nodeType ? [b] : b; d = o.match.PSEUDO.exec(a);) f += d[0], a = a.replace(o.match.PSEUDO, "");
a = o.relative[a] ? a + "*" : a;
for (var h = 0, i = g.length; i > h; h++) m(a, g[h], e, c);
return m.filter(f, e)
};
m.attr = K.attr, m.selectors.attrMap = {}, K.find = m, K.expr = m.selectors, K.expr[":"] = K.expr.filters, K.unique = m.uniqueSort, K.text = m.getText, K.isXMLDoc = m.isXML, K.contains = m.contains
}();
var ib = /Until$/,
jb = /^(?:parents|prevUntil|prevAll)/,
kb = /,/,
lb = /^.[^:#\[\.,]*$/,
mb = Array.prototype.slice,
nb = K.expr.match.POS,
ob = {
children: !0,
contents: !0,
next: !0,
prev: !0
};
K.fn.extend({
find: function (a) {
var b, c, d = this;
if ("string" != typeof a) return K(a).filter(function () {
for (b = 0, c = d.length; c > b; b++)
if (K.contains(d[b], this)) return !0
});
var e, f, g, h = this.pushStack("", "find", a);
for (b = 0, c = this.length; c > b; b++)
if (e = h.length, K.find(a, this[b], h), b > 0)
for (f = e; f < h.length; f++)
for (g = 0; e > g; g++)
if (h[g] === h[f]) {
h.splice(f--, 1);
break
}
return h
},
has: function (a) {
var b = K(a);
return this.filter(function () {
for (var a = 0, c = b.length; c > a; a++)
if (K.contains(this, b[a])) return !0
})
},
not: function (a) {
return this.pushStack(j(this, a, !1), "not", a)
},
filter: function (a) {
return this.pushStack(j(this, a, !0), "filter", a)
},
is: function (a) {
return !!a && ("string" == typeof a ? nb.test(a) ? K(a, this.context).index(this[0]) >= 0 : K.filter(a, this).length > 0 : this.filter(a).length > 0)
},
closest: function (a, b) {
var c, d, e = [],
f = this[0];
if (K.isArray(a)) {
for (var g = 1; f && f.ownerDocument && f !== b;) {
for (c = 0; c < a.length; c++) K(f).is(a[c]) && e.push({
selector: a[c],
elem: f,
level: g
});
f = f.parentNode, g++
}
return e
}
var h = nb.test(a) || "string" != typeof a ? K(a, b || this.context) : 0;
for (c = 0, d = this.length; d > c; c++)
for (f = this[c]; f;) {
if (h ? h.index(f) > -1 : K.find.matchesSelector(f, a)) {
e.push(f);
break
}
if (f = f.parentNode, !f || !f.ownerDocument || f === b || 11 === f.nodeType) break
}
return e = e.length > 1 ? K.unique(e) : e, this.pushStack(e, "closest", a)
},
index: function (a) {
return a ? "string" == typeof a ? K.inArray(this[0], K(a)) : K.inArray(a.jquery ? a[0] : a, this) : this[0] && this[0].parentNode ? this.prevAll().length : -1
},
add: function (a, b) {
var c = "string" == typeof a ? K(a, b) : K.makeArray(a && a.nodeType ? [a] : a),
d = K.merge(this.get(), c);
return this.pushStack(i(c[0]) || i(d[0]) ? d : K.unique(d))
},
andSelf: function () {
return this.add(this.prevObject)
}
}), K.each({
parent: function (a) {
var b = a.parentNode;
return b && 11 !== b.nodeType ? b : null
},
parents: function (a) {
return K.dir(a, "parentNode")
},
parentsUntil: function (a, b, c) {
return K.dir(a, "parentNode", c)
},
next: function (a) {
return K.nth(a, 2, "nextSibling")
},
prev: function (a) {
return K.nth(a, 2, "previousSibling")
},
nextAll: function (a) {
return K.dir(a, "nextSibling")
},
prevAll: function (a) {
return K.dir(a, "previousSibling")
},
nextUntil: function (a, b, c) {
return K.dir(a, "nextSibling", c)
},
prevUntil: function (a, b, c) {
return K.dir(a, "previousSibling", c)
},
siblings: function (a) {
return K.sibling(a.parentNode.firstChild, a)
},
children: function (a) {
return K.sibling(a.firstChild)
},
contents: function (a) {
return K.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : K.makeArray(a.childNodes)
}
}, function (a, b) {
K.fn[a] = function (c, d) {
var e = K.map(this, b, c);
return ib.test(a) || (d = c), d && "string" == typeof d && (e = K.filter(d, e)), e = this.length > 1 && !ob[a] ? K.unique(e) : e, (this.length > 1 || kb.test(d)) && jb.test(a) && (e = e.reverse()), this.pushStack(e, a, mb.call(arguments).join(","))
}
}), K.extend({
filter: function (a, b, c) {
return c && (a = ":not(" + a + ")"), 1 === b.length ? K.find.matchesSelector(b[0], a) ? [b[0]] : [] : K.find.matches(a, b)
},
dir: function (a, c, d) {
for (var e = [], f = a[c]; f && 9 !== f.nodeType && (d === b || 1 !== f.nodeType || !K(f).is(d));) 1 === f.nodeType && e.push(f), f = f[c];
return e
},
nth: function (a, b, c) {
b = b || 1;
for (var d = 0; a && (1 !== a.nodeType || ++d !== b); a = a[c]);
return a
},
sibling: function (a, b) {
for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a);
return c
}
});
var pb = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
qb = / jQuery\d+="(?:\d+|null)"/g,
rb = /^\s+/,
sb = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
tb = /<([\w:]+)/,
ub = /<tbody/i,
vb = /<|&#?\w+;/,
wb = /<(?:script|style)/i,
xb = /<(?:script|object|embed|option|style)/i,
yb = new RegExp("<(?:" + pb + ")", "i"),
zb = /checked\s*(?:[^=]|=\s*.checked.)/i,
Ab = /\/(java|ecma)script/i,
Bb = /^\s*<!(?:\[CDATA\[|\-\-)/,
Cb = {
option: [1, "<select multiple='multiple'>", "</select>"],
legend: [1, "<fieldset>", "</fieldset>"],
thead: [1, "<table>", "</table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
area: [1, "<map>", "</map>"],
_default: [0, "", ""]
}, Db = k(H);
Cb.optgroup = Cb.option, Cb.tbody = Cb.tfoot = Cb.colgroup = Cb.caption = Cb.thead, Cb.th = Cb.td, K.support.htmlSerialize || (Cb._default = [1, "div<div>", "</div>"]), K.fn.extend({
text: function (a) {
return K.isFunction(a) ? this.each(function (b) {
var c = K(this);
c.text(a.call(this, b, c.text()))
}) : "object" != typeof a && a !== b ? this.empty().append((this[0] && this[0].ownerDocument || H).createTextNode(a)) : K.text(this)
},
wrapAll: function (a) {
if (K.isFunction(a)) return this.each(function (b) {
K(this).wrapAll(a.call(this, b))
});
if (this[0]) {
var b = K(a, this[0].ownerDocument).eq(0).clone(!0);
this[0].parentNode && b.insertBefore(this[0]), b.map(function () {
for (var a = this; a.firstChild && 1 === a.firstChild.nodeType;) a = a.firstChild;
return a
}).append(this)
}
return this
},
wrapInner: function (a) {
return K.isFunction(a) ? this.each(function (b) {
K(this).wrapInner(a.call(this, b))
}) : this.each(function () {
var b = K(this),
c = b.contents();
c.length ? c.wrapAll(a) : b.append(a)
})
},
wrap: function (a) {
var b = K.isFunction(a);
return this.each(function (c) {
K(this).wrapAll(b ? a.call(this, c) : a)
})
},
unwrap: function () {
return this.parent().each(function () {
K.nodeName(this, "body") || K(this).replaceWith(this.childNodes)
}).end()
},
append: function () {
return this.domManip(arguments, !0, function (a) {
1 === this.nodeType && this.appendChild(a)
})
},
prepend: function () {
return this.domManip(arguments, !0, function (a) {
1 === this.nodeType && this.insertBefore(a, this.firstChild)
})
},
before: function () {
if (this[0] && this[0].parentNode) return this.domManip(arguments, !1, function (a) {
this.parentNode.insertBefore(a, this)
});
if (arguments.length) {
var a = K.clean(arguments);
return a.push.apply(a, this.toArray()), this.pushStack(a, "before", arguments)
}
},
after: function () {
if (this[0] && this[0].parentNode) return this.domManip(arguments, !1, function (a) {
this.parentNode.insertBefore(a, this.nextSibling)
});
if (arguments.length) {
var a = this.pushStack(this, "after", arguments);
return a.push.apply(a, K.clean(arguments)), a
}
},
remove: function (a, b) {
for (var c, d = 0; null != (c = this[d]); d++)(!a || K.filter(a, [c]).length) && (b || 1 !== c.nodeType || (K.cleanData(c.getElementsByTagName("*")), K.cleanData([c])), c.parentNode && c.parentNode.removeChild(c));
return this
},
empty: function () {
for (var a, b = 0; null != (a = this[b]); b++)
for (1 === a.nodeType && K.cleanData(a.getElementsByTagName("*")); a.firstChild;) a.removeChild(a.firstChild);
return this
},
clone: function (a, b) {
return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function () {
return K.clone(this, a, b)
})
},
html: function (a) {
if (a === b) return this[0] && 1 === this[0].nodeType ? this[0].innerHTML.replace(qb, "") : null;
if ("string" != typeof a || wb.test(a) || !K.support.leadingWhitespace && rb.test(a) || Cb[(tb.exec(a) || ["", ""])[1].toLowerCase()]) K.isFunction(a) ? this.each(function (b) {
var c = K(this);
c.html(a.call(this, b, c.html()))
}) : this.empty().append(a);
else {
a = a.replace(sb, "<$1></$2>");
try {
for (var c = 0, d = this.length; d > c; c++) 1 === this[c].nodeType && (K.cleanData(this[c].getElementsByTagName("*")), this[c].innerHTML = a)
} catch (e) {
this.empty().append(a)
}
}
return this
},
replaceWith: function (a) {
return this[0] && this[0].parentNode ? K.isFunction(a) ? this.each(function (b) {
var c = K(this),
d = c.html();
c.replaceWith(a.call(this, b, d))
}) : ("string" != typeof a && (a = K(a).detach()), this.each(function () {
var b = this.nextSibling,
c = this.parentNode;
K(this).remove(), b ? K(b).before(a) : K(c).append(a)
})) : this.length ? this.pushStack(K(K.isFunction(a) ? a() : a), "replaceWith", a) : this
},
detach: function (a) {
return this.remove(a, !0)
},
domManip: function (a, c, d) {
var e, f, g, h, i = a[0],
j = [];
if (!K.support.checkClone && 3 === arguments.length && "string" == typeof i && zb.test(i)) return this.each(function () {
K(this).domManip(a, c, d, !0)
});
if (K.isFunction(i)) return this.each(function (e) {
var f = K(this);
a[0] = i.call(this, e, c ? f.html() : b), f.domManip(a, c, d)
});
if (this[0]) {
if (h = i && i.parentNode, e = K.support.parentNode && h && 11 === h.nodeType && h.childNodes.length === this.length ? {
fragment: h
} : K.buildFragment(a, this, j), g = e.fragment, f = 1 === g.childNodes.length ? g = g.firstChild : g.firstChild) {
c = c && K.nodeName(f, "tr");
for (var k = 0, m = this.length, n = m - 1; m > k; k++) d.call(c ? l(this[k], f) : this[k], e.cacheable || m > 1 && n > k ? K.clone(g, !0, !0) : g)
}
j.length && K.each(j, s)
}
return this
}
}), K.buildFragment = function (a, b, c) {
var d, e, f, g, h = a[0];
return b && b[0] && (g = b[0].ownerDocument || b[0]), g.createDocumentFragment || (g = H), !(1 === a.length && "string" == typeof h && h.length < 512 && g === H && "<" === h.charAt(0)) || xb.test(h) || !K.support.checkClone && zb.test(h) || !K.support.html5Clone && yb.test(h) || (e = !0, f = K.fragments[h], f && 1 !== f && (d = f)), d || (d = g.createDocumentFragment(), K.clean(a, g, d, c)), e && (K.fragments[h] = f ? d : 1), {
fragment: d,
cacheable: e
}
}, K.fragments = {}, K.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function (a, b) {
K.fn[a] = function (c) {
var d = [],
e = K(c),
f = 1 === this.length && this[0].parentNode;
if (f && 11 === f.nodeType && 1 === f.childNodes.length && 1 === e.length) return e[b](this[0]), this;
for (var g = 0, h = e.length; h > g; g++) {
var i = (g > 0 ? this.clone(!0) : this).get();
K(e[g])[b](i), d = d.concat(i)
}
return this.pushStack(d, a, e.selector)
}
}), K.extend({
clone: function (a, b, c) {
var d, e, f, g = K.support.html5Clone || !yb.test("<" + a.nodeName) ? a.cloneNode(!0) : r(a);
if (!(K.support.noCloneEvent && K.support.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || K.isXMLDoc(a)))
for (n(a, g), d = o(a), e = o(g), f = 0; d[f]; ++f) e[f] && n(d[f], e[f]);
if (b && (m(a, g), c))
for (d = o(a), e = o(g), f = 0; d[f]; ++f) m(d[f], e[f]);
return d = e = null, g
},
clean: function (a, b, c, d) {
var e;
b = b || H, "undefined" == typeof b.createElement && (b = b.ownerDocument || b[0] && b[0].ownerDocument || H);
for (var f, g, h = [], i = 0; null != (g = a[i]); i++)
if ("number" == typeof g && (g += ""), g) {
if ("string" == typeof g)
if (vb.test(g)) {
g = g.replace(sb, "<$1></$2>");
var j = (tb.exec(g) || ["", ""])[1].toLowerCase(),
l = Cb[j] || Cb._default,
m = l[0],
n = b.createElement("div");
for (b === H ? Db.appendChild(n) : k(b).appendChild(n), n.innerHTML = l[1] + g + l[2]; m--;) n = n.lastChild;
if (!K.support.tbody) {
var o = ub.test(g),
p = "table" !== j || o ? "<table>" !== l[1] || o ? [] : n.childNodes : n.firstChild && n.firstChild.childNodes;
for (f = p.length - 1; f >= 0; --f) K.nodeName(p[f], "tbody") && !p[f].childNodes.length && p[f].parentNode.removeChild(p[f])
}!K.support.leadingWhitespace && rb.test(g) && n.insertBefore(b.createTextNode(rb.exec(g)[0]), n.firstChild), g = n.childNodes
} else g = b.createTextNode(g);
var r;
if (!K.support.appendChecked)
if (g[0] && "number" == typeof (r = g.length))
for (f = 0; r > f; f++) q(g[f]);
else q(g);
g.nodeType ? h.push(g) : h = K.merge(h, g)
}
if (c)
for (e = function (a) {
return !a.type || Ab.test(a.type)
}, i = 0; h[i]; i++)
if (!d || !K.nodeName(h[i], "script") || h[i].type && "text/javascript" !== h[i].type.toLowerCase()) {
if (1 === h[i].nodeType) {
var s = K.grep(h[i].getElementsByTagName("script"), e);
h.splice.apply(h, [i + 1, 0].concat(s))
}
c.appendChild(h[i])
} else d.push(h[i].parentNode ? h[i].parentNode.removeChild(h[i]) : h[i]);
return h
},
cleanData: function (a) {
for (var b, c, d, e = K.cache, f = K.event.special, g = K.support.deleteExpando, h = 0; null != (d = a[h]); h++)
if ((!d.nodeName || !K.noData[d.nodeName.toLowerCase()]) && (c = d[K.expando])) {
if (b = e[c], b && b.events) {
for (var i in b.events) f[i] ? K.event.remove(d, i) : K.removeEvent(d, i, b.handle);
b.handle && (b.handle.elem = null)
}
g ? delete d[K.expando] : d.removeAttribute && d.removeAttribute(K.expando), delete e[c]
}
}
});
var Eb, Fb, Gb, Hb = /alpha\([^)]*\)/i,
Ib = /opacity=([^)]*)/,
Jb = /([A-Z]|^ms)/g,
Kb = /^-?\d+(?:px)?$/i,
Lb = /^-?\d/,
Mb = /^([\-+])=([\-+.\de]+)/,
Nb = {
position: "absolute",
visibility: "hidden",
display: "block"
}, Ob = ["Left", "Right"],
Pb = ["Top", "Bottom"];
K.fn.css = function (a, c) {
return 2 === arguments.length && c === b ? this : K.access(this, a, c, !0, function (a, c, d) {
return d !== b ? K.style(a, c, d) : K.css(a, c)
})
}, K.extend({
cssHooks: {
opacity: {
get: function (a, b) {
if (b) {
var c = Eb(a, "opacity", "opacity");
return "" === c ? "1" : c
}
return a.style.opacity
}
}
},
cssNumber: {
fillOpacity: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {
"float": K.support.cssFloat ? "cssFloat" : "styleFloat"
},
style: function (a, c, d, e) {
if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {
var f, g, h = K.camelCase(c),
i = a.style,
j = K.cssHooks[h];
if (c = K.cssProps[h] || h, d === b) return j && "get" in j && (f = j.get(a, !1, e)) !== b ? f : i[c];
if (g = typeof d, "string" === g && (f = Mb.exec(d)) && (d = +(f[1] + 1) * +f[2] + parseFloat(K.css(a, c)), g = "number"), !(null == d || "number" === g && isNaN(d) || ("number" !== g || K.cssNumber[h] || (d += "px"), j && "set" in j && (d = j.set(a, d)) === b))) try {
i[c] = d
} catch (k) {}
}
},
css: function (a, c, d) {
var e, f;
return c = K.camelCase(c), f = K.cssHooks[c], c = K.cssProps[c] || c, "cssFloat" === c && (c = "float"), f && "get" in f && (e = f.get(a, !0, d)) !== b ? e : Eb ? Eb(a, c) : void 0
},
swap: function (a, b, c) {
var d = {};
for (var e in b) d[e] = a.style[e], a.style[e] = b[e];
c.call(a);
for (e in b) a.style[e] = d[e]
}
}), K.curCSS = K.css, K.each(["height", "width"], function (a, b) {
K.cssHooks[b] = {
get: function (a, c, d) {
var e;
return c ? 0 !== a.offsetWidth ? t(a, b, d) : (K.swap(a, Nb, function () {
e = t(a, b, d)
}), e) : void 0
},
set: function (a, b) {
return Kb.test(b) ? (b = parseFloat(b), b >= 0 ? b + "px" : void 0) : b
}
}
}), K.support.opacity || (K.cssHooks.opacity = {
get: function (a, b) {
return Ib.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "" : b ? "1" : ""
},
set: function (a, b) {
var c = a.style,
d = a.currentStyle,
e = K.isNumeric(b) ? "alpha(opacity=" + 100 * b + ")" : "",
f = d && d.filter || c.filter || "";
c.zoom = 1, b >= 1 && "" === K.trim(f.replace(Hb, "")) && (c.removeAttribute("filter"), d && !d.filter) || (c.filter = Hb.test(f) ? f.replace(Hb, e) : f + " " + e)
}
}), K(function () {
K.support.reliableMarginRight || (K.cssHooks.marginRight = {
get: function (a, b) {
var c;
return K.swap(a, {
display: "inline-block"
}, function () {
c = b ? Eb(a, "margin-right", "marginRight") : a.style.marginRight
}), c
}
})
}), H.defaultView && H.defaultView.getComputedStyle && (Fb = function (a, b) {
var c, d, e;
return b = b.replace(Jb, "-$1").toLowerCase(), (d = a.ownerDocument.defaultView) && (e = d.getComputedStyle(a, null)) && (c = e.getPropertyValue(b), "" !== c || K.contains(a.ownerDocument.documentElement, a) || (c = K.style(a, b))), c
}), H.documentElement.currentStyle && (Gb = function (a, b) {
var c, d, e, f = a.currentStyle && a.currentStyle[b],
g = a.style;
return null === f && g && (e = g[b]) && (f = e), !Kb.test(f) && Lb.test(f) && (c = g.left, d = a.runtimeStyle && a.runtimeStyle.left, d && (a.runtimeStyle.left = a.currentStyle.left), g.left = "fontSize" === b ? "1em" : f || 0, f = g.pixelLeft + "px", g.left = c, d && (a.runtimeStyle.left = d)), "" === f ? "auto" : f
}), Eb = Fb || Gb, K.expr && K.expr.filters && (K.expr.filters.hidden = function (a) {
var b = a.offsetWidth,
c = a.offsetHeight;
return 0 === b && 0 === c || !K.support.reliableHiddenOffsets && "none" === (a.style && a.style.display || K.css(a, "display"))
}, K.expr.filters.visible = function (a) {
return !K.expr.filters.hidden(a)
});
var Qb, Rb, Sb = /%20/g,
Tb = /\[\]$/,
Ub = /\r?\n/g,
Vb = /#.*$/,
Wb = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
Xb = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
Yb = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
Zb = /^(?:GET|HEAD)$/,
$b = /^\/\//,
_b = /\?/,
ac = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
bc = /^(?:select|textarea)/i,
cc = /\s+/,
dc = /([?&])_=[^&]*/,
ec = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
fc = K.fn.load,
gc = {}, hc = {}, ic = ["*/"] + ["*"];
try {
Qb = J.href
} catch (jc) {
Qb = H.createElement("a"), Qb.href = "", Qb = Qb.href
}
Rb = ec.exec(Qb.toLowerCase()) || [], K.fn.extend({
load: function (a, c, d) {
if ("string" != typeof a && fc) return fc.apply(this, arguments);
if (!this.length) return this;
var e = a.indexOf(" ");
if (e >= 0) {
var f = a.slice(e, a.length);
a = a.slice(0, e)
}
var g = "GET";
c && (K.isFunction(c) ? (d = c, c = b) : "object" == typeof c && (c = K.param(c, K.ajaxSettings.traditional), g = "POST"));
var h = this;
return K.ajax({
url: a,
type: g,
dataType: "html",
data: c,
complete: function (a, b, c) {
c = a.responseText, a.isResolved() && (a.done(function (a) {
c = a
}), h.html(f ? K("<div>").append(c.replace(ac, "")).find(f) : c)), d && h.each(d, [c, b, a])
}
}), this
},
serialize: function () {
return K.param(this.serializeArray())
},
serializeArray: function () {
return this.map(function () {
return this.elements ? K.makeArray(this.elements) : this
}).filter(function () {
return this.name && !this.disabled && (this.checked || bc.test(this.nodeName) || Xb.test(this.type))
}).map(function (a, b) {
var c = K(this).val();
return null == c ? null : K.isArray(c) ? K.map(c, function (a) {
return {
name: b.name,
value: a.replace(Ub, "\r\n")
}
}) : {
name: b.name,
value: c.replace(Ub, "\r\n")
}
}).get()
}
}), K.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (a, b) {
K.fn[b] = function (a) {
return this.on(b, a)
}
}), K.each(["get", "post"], function (a, c) {
K[c] = function (a, d, e, f) {
return K.isFunction(d) && (f = f || e, e = d, d = b), K.ajax({
type: c,
url: a,
data: d,
success: e,
dataType: f
})
}
}), K.extend({
getScript: function (a, c) {
return K.get(a, b, c, "script")
},
getJSON: function (a, b, c) {
return K.get(a, b, c, "json")
},
ajaxSetup: function (a, b) {
return b ? w(a, K.ajaxSettings) : (b = a, a = K.ajaxSettings), w(a, b), a
},
ajaxSettings: {
url: Qb,
isLocal: Yb.test(Rb[1]),
global: !0,
type: "GET",
contentType: "application/x-www-form-urlencoded",
processData: !0,
async: !0,
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
text: "text/plain",
json: "application/json, text/javascript",
"*": ic
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText"
},
converters: {
"* text": a.String,
"text html": !0,
"text json": K.parseJSON,
"text xml": K.parseXML
},
flatOptions: {
context: !0,
url: !0
}
},
ajaxPrefilter: u(gc),
ajaxTransport: u(hc),
ajax: function (a, c) {
function d(a, c, d, g) {
if (2 !== u) {
u = 2, i && clearTimeout(i), h = b, f = g || "", w.readyState = a > 0 ? 4 : 0;
var j, l, s, t, v, x = c,
A = d ? y(m, w, d) : b;
if (a >= 200 && 300 > a || 304 === a)
if (m.ifModified && ((t = w.getResponseHeader("Last-Modified")) && (K.lastModified[e] = t), (v = w.getResponseHeader("Etag")) && (K.etag[e] = v)), 304 === a) x = "notmodified", j = !0;
else try {
l = z(m, A), x = "success", j = !0
} catch (B) {
x = "parsererror", s = B
} else s = x, (!x || a) && (x = "error", 0 > a && (a = 0));
w.status = a, w.statusText = "" + (c || x), j ? p.resolveWith(n, [l, x, w]) : p.rejectWith(n, [w, x, s]), w.statusCode(r), r = b, k && o.trigger("ajax" + (j ? "Success" : "Error"), [w, m, j ? l : s]), q.fireWith(n, [w, x]), k && (o.trigger("ajaxComplete", [w, m]), --K.active || K.event.trigger("ajaxStop"))
}
}
"object" == typeof a && (c = a, a = b), c = c || {};
var e, f, g, h, i, j, k, l, m = K.ajaxSetup({}, c),
n = m.context || m,
o = n !== m && (n.nodeType || n instanceof K) ? K(n) : K.event,
p = K.Deferred(),
q = K.Callbacks("once memory"),
r = m.statusCode || {}, s = {}, t = {}, u = 0,
w = {
readyState: 0,
setRequestHeader: function (a, b) {
if (!u) {
var c = a.toLowerCase();
a = t[c] = t[c] || a, s[a] = b
}
return this
},
getAllResponseHeaders: function () {
return 2 === u ? f : null
},
getResponseHeader: function (a) {
var c;
if (2 === u) {
if (!g)
for (g = {}; c = Wb.exec(f);) g[c[1].toLowerCase()] = c[2];
c = g[a.toLowerCase()]
}
return c === b ? null : c
},
overrideMimeType: function (a) {
return u || (m.mimeType = a), this
},
abort: function (a) {
return a = a || "abort", h && h.abort(a), d(0, a), this
}
};
if (p.promise(w), w.success = w.done, w.error = w.fail, w.complete = q.add, w.statusCode = function (a) {
if (a) {
var b;
if (2 > u)
for (b in a) r[b] = [r[b], a[b]];
else b = a[w.status], w.then(b, b)
}
return this
}, m.url = ((a || m.url) + "").replace(Vb, "").replace($b, Rb[1] + "//"), m.dataTypes = K.trim(m.dataType || "*").toLowerCase().split(cc), null == m.crossDomain && (j = ec.exec(m.url.toLowerCase()), m.crossDomain = !(!j || j[1] == Rb[1] && j[2] == Rb[2] && (j[3] || ("http:" === j[1] ? 80 : 443)) == (Rb[3] || ("http:" === Rb[1] ? 80 : 443)))), m.data && m.processData && "string" != typeof m.data && (m.data = K.param(m.data, m.traditional)), v(gc, m, c, w), 2 === u) return !1;
if (k = m.global, m.type = m.type.toUpperCase(), m.hasContent = !Zb.test(m.type), k && 0 === K.active++ && K.event.trigger("ajaxStart"), !m.hasContent && (m.data && (m.url += (_b.test(m.url) ? "&" : "?") + m.data, delete m.data), e = m.url, m.cache === !1)) {
var x = K.now(),
A = m.url.replace(dc, "$1_=" + x);
m.url = A + (A === m.url ? (_b.test(m.url) ? "&" : "?") + "_=" + x : "")
}(m.data && m.hasContent && m.contentType !== !1 || c.contentType) && w.setRequestHeader("Content-Type", m.contentType), m.ifModified && (e = e || m.url, K.lastModified[e] && w.setRequestHeader("If-Modified-Since", K.lastModified[e]), K.etag[e] && w.setRequestHeader("If-None-Match", K.etag[e])), w.setRequestHeader("Accept", m.dataTypes[0] && m.accepts[m.dataTypes[0]] ? m.accepts[m.dataTypes[0]] + ("*" !== m.dataTypes[0] ? ", " + ic + "; q=0.01" : "") : m.accepts["*"]);
for (l in m.headers) w.setRequestHeader(l, m.headers[l]);
if (m.beforeSend && (m.beforeSend.call(n, w, m) === !1 || 2 === u)) return w.abort(), !1;
for (l in {
success: 1,
error: 1,
complete: 1
}) w[l](m[l]);
if (h = v(hc, m, c, w)) {
w.readyState = 1, k && o.trigger("ajaxSend", [w, m]), m.async && m.timeout > 0 && (i = setTimeout(function () {
w.abort("timeout")
}, m.timeout));
try {
u = 1, h.send(s, d)
} catch (B) {
if (!(2 > u)) throw B;
d(-1, B)
}
} else d(-1, "No Transport");
return w
},
param: function (a, c) {
var d = [],
e = function (a, b) {
b = K.isFunction(b) ? b() : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
};
if (c === b && (c = K.ajaxSettings.traditional), K.isArray(a) || a.jquery && !K.isPlainObject(a)) K.each(a, function () {
e(this.name, this.value)
});
else
for (var f in a) x(f, a[f], c, e);
return d.join("&").replace(Sb, "+")
}
}), K.extend({
active: 0,
lastModified: {},
etag: {}
});
var kc = K.now(),
lc = /(\=)\?(&|$)|\?\?/i;
K.ajaxSetup({
jsonp: "callback",
jsonpCallback: function () {
return K.expando + "_" + kc++
}
}), K.ajaxPrefilter("json jsonp", function (b, c, d) {
var e = "application/x-www-form-urlencoded" === b.contentType && "string" == typeof b.data;
if ("jsonp" === b.dataTypes[0] || b.jsonp !== !1 && (lc.test(b.url) || e && lc.test(b.data))) {
var f, g = b.jsonpCallback = K.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback,
h = a[g],
i = b.url,
j = b.data,
k = "$1" + g + "$2";
return b.jsonp !== !1 && (i = i.replace(lc, k), b.url === i && (e && (j = j.replace(lc, k)), b.data === j && (i += (/\?/.test(i) ? "&" : "?") + b.jsonp + "=" + g))), b.url = i, b.data = j, a[g] = function (a) {
f = [a]
}, d.always(function () {
a[g] = h, f && K.isFunction(h) && a[g](f[0])
}), b.converters["script json"] = function () {
return f || K.error(g + " was not called"), f[0]
}, b.dataTypes[0] = "json", "script"
}
}), K.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /javascript|ecmascript/
},
converters: {
"text script": function (a) {
return K.globalEval(a), a
}
}
}), K.ajaxPrefilter("script", function (a) {
a.cache === b && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
}), K.ajaxTransport("script", function (a) {
if (a.crossDomain) {
var c, d = H.head || H.getElementsByTagName("head")[0] || H.documentElement;
return {
send: function (e, f) {
c = H.createElement("script"), c.async = "async", a.scriptCharset && (c.charset = a.scriptCharset), c.src = a.url, c.onload = c.onreadystatechange = function (a, e) {
(e || !c.readyState || /loaded|complete/.test(c.readyState)) && (c.onload = c.onreadystatechange = null, d && c.parentNode && d.removeChild(c), c = b, e || f(200, "success"))
}, d.insertBefore(c, d.firstChild)
},
abort: function () {
c && c.onload(0, 1)
}
}
}
});
var mc, nc = a.ActiveXObject ? function () {
for (var a in mc) mc[a](0, 1)
} : !1,
oc = 0;
K.ajaxSettings.xhr = a.ActiveXObject ? function () {
return !this.isLocal && A() || B()
} : A,
function (a) {
K.extend(K.support, {
ajax: !! a,
cors: !! a && "withCredentials" in a
})
}(K.ajaxSettings.xhr()), K.support.ajax && K.ajaxTransport(function (c) {
if (!c.crossDomain || K.support.cors) {
var d;
return {
send: function (e, f) {
var g, h, i = c.xhr();
if (c.username ? i.open(c.type, c.url, c.async, c.username, c.password) : i.open(c.type, c.url, c.async), c.xhrFields)
for (h in c.xhrFields) i[h] = c.xhrFields[h];
c.mimeType && i.overrideMimeType && i.overrideMimeType(c.mimeType), c.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest");
try {
for (h in e) i.setRequestHeader(h, e[h])
} catch (j) {}
i.send(c.hasContent && c.data || null), d = function (a, e) {
var h, j, k, l, m;
try {
if (d && (e || 4 === i.readyState))
if (d = b, g && (i.onreadystatechange = K.noop, nc && delete mc[g]), e) 4 !== i.readyState && i.abort();
else {
h = i.status, k = i.getAllResponseHeaders(), l = {}, m = i.responseXML, m && m.documentElement && (l.xml = m), l.text = i.responseText;
try {
j = i.statusText
} catch (n) {
j = ""
}
h || !c.isLocal || c.crossDomain ? 1223 === h && (h = 204) : h = l.text ? 200 : 404
}
} catch (o) {
e || f(-1, o)
}
l && f(h, j, l, k)
}, c.async && 4 !== i.readyState ? (g = ++oc, nc && (mc || (mc = {}, K(a).unload(nc)), mc[g] = d), i.onreadystatechange = d) : d()
},
abort: function () {
d && d(0, 1)
}
}
}
});
var pc, qc, rc, sc, tc = {}, uc = /^(?:toggle|show|hide)$/,
vc = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
wc = [
["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
["opacity"]
];
K.fn.extend({
show: function (a, b, c) {
var d, e;
if (a || 0 === a) return this.animate(E("show", 3), a, b, c);
for (var f = 0, g = this.length; g > f; f++) d = this[f], d.style && (e = d.style.display, K._data(d, "olddisplay") || "none" !== e || (e = d.style.display = ""), "" === e && "none" === K.css(d, "display") && K._data(d, "olddisplay", F(d.nodeName)));
for (f = 0; g > f; f++) d = this[f], d.style && (e = d.style.display, ("" === e || "none" === e) && (d.style.display = K._data(d, "olddisplay") || ""));
return this
},
hide: function (a, b, c) {
if (a || 0 === a) return this.animate(E("hide", 3), a, b, c);
for (var d, e, f = 0, g = this.length; g > f; f++) d = this[f], d.style && (e = K.css(d, "display"), "none" === e || K._data(d, "olddisplay") || K._data(d, "olddisplay", e));
for (f = 0; g > f; f++) this[f].style && (this[f].style.display = "none");
return this
},
_toggle: K.fn.toggle,
toggle: function (a, b, c) {
var d = "boolean" == typeof a;
return K.isFunction(a) && K.isFunction(b) ? this._toggle.apply(this, arguments) : null == a || d ? this.each(function () {
var b = d ? a : K(this).is(":hidden");
K(this)[b ? "show" : "hide"]()
}) : this.animate(E("toggle", 3), a, b, c), this
},
fadeTo: function (a, b, c, d) {
return this.filter(":hidden").css("opacity", 0).show().end().animate({
opacity: b
}, a, c, d)
},
animate: function (a, b, c, d) {
function e() {
f.queue === !1 && K._mark(this);
var b, c, d, e, g, h, i, j, k, l = K.extend({}, f),
m = 1 === this.nodeType,
n = m && K(this).is(":hidden");
l.animatedProperties = {};
for (d in a) {
if (b = K.camelCase(d), d !== b && (a[b] = a[d], delete a[d]), c = a[b], K.isArray(c) ? (l.animatedProperties[b] = c[1], c = a[b] = c[0]) : l.animatedProperties[b] = l.specialEasing && l.specialEasing[b] || l.easing || "swing", "hide" === c && n || "show" === c && !n) return l.complete.call(this);
!m || "height" !== b && "width" !== b || (l.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY], "inline" === K.css(this, "display") && "none" === K.css(this, "float") && (K.support.inlineBlockNeedsLayout && "inline" !== F(this.nodeName) ? this.style.zoom = 1 : this.style.display = "inline-block"))
}
null != l.overflow && (this.style.overflow = "hidden");
for (d in a) e = new K.fx(this, l, d), c = a[d], uc.test(c) ? (k = K._data(this, "toggle" + d) || ("toggle" === c ? n ? "show" : "hide" : 0), k ? (K._data(this, "toggle" + d, "show" === k ? "hide" : "show"), e[k]()) : e[c]()) : (g = vc.exec(c), h = e.cur(), g ? (i = parseFloat(g[2]), j = g[3] || (K.cssNumber[d] ? "" : "px"), "px" !== j && (K.style(this, d, (i || 1) + j), h = (i || 1) / e.cur() * h, K.style(this, d, h + j)), g[1] && (i = ("-=" === g[1] ? -1 : 1) * i + h), e.custom(h, i, j)) : e.custom(h, c, ""));
return !0
}
var f = K.speed(b, c, d);
return K.isEmptyObject(a) ? this.each(f.complete, [!1]) : (a = K.extend({}, a), f.queue === !1 ? this.each(e) : this.queue(f.queue, e))
},
stop: function (a, c, d) {
return "string" != typeof a && (d = c, c = a, a = b), c && a !== !1 && this.queue(a || "fx", []), this.each(function () {
function b(a, b, c) {
var e = b[c];
K.removeData(a, c, !0), e.stop(d)
}
var c, e = !1,
f = K.timers,
g = K._data(this);
if (d || K._unmark(!0, this), null == a)
for (c in g) g[c] && g[c].stop && c.indexOf(".run") === c.length - 4 && b(this, g, c);
else g[c = a + ".run"] && g[c].stop && b(this, g, c);
for (c = f.length; c--;) f[c].elem !== this || null != a && f[c].queue !== a || (d ? f[c](!0) : f[c].saveState(), e = !0, f.splice(c, 1));
d && e || K.dequeue(this, a)
})
}
}), K.each({
slideDown: E("show", 1),
slideUp: E("hide", 1),
slideToggle: E("toggle", 1),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function (a, b) {
K.fn[a] = function (a, c, d) {
return this.animate(b, a, c, d)
}
}), K.extend({
speed: function (a, b, c) {
var d = a && "object" == typeof a ? K.extend({}, a) : {
complete: c || !c && b || K.isFunction(a) && a,
duration: a,
easing: c && b || b && !K.isFunction(b) && b
};
return d.duration = K.fx.off ? 0 : "number" == typeof d.duration ? d.duration : d.duration in K.fx.speeds ? K.fx.speeds[d.duration] : K.fx.speeds._default, (null == d.queue || d.queue === !0) && (d.queue = "fx"), d.old = d.complete, d.complete = function (a) {
K.isFunction(d.old) && d.old.call(this), d.queue ? K.dequeue(this, d.queue) : a !== !1 && K._unmark(this)
}, d
},
easing: {
linear: function (a, b, c, d) {
return c + d * a
},
swing: function (a, b, c, d) {
return (-Math.cos(a * Math.PI) / 2 + .5) * d + c
}
},
timers: [],
fx: function (a, b, c) {
this.options = b, this.elem = a, this.prop = c, b.orig = b.orig || {}
}
}), K.fx.prototype = {
update: function () {
this.options.step && this.options.step.call(this.elem, this.now, this), (K.fx.step[this.prop] || K.fx.step._default)(this)
},
cur: function () {
if (null != this.elem[this.prop] && (!this.elem.style || null == this.elem.style[this.prop])) return this.elem[this.prop];
var a, b = K.css(this.elem, this.prop);
return isNaN(a = parseFloat(b)) ? b && "auto" !== b ? b : 0 : a
},
custom: function (a, c, d) {
function e(a) {
return f.step(a)
}
var f = this,
g = K.fx;
this.startTime = sc || C(), this.end = c, this.now = this.start = a, this.pos = this.state = 0, this.unit = d || this.unit || (K.cssNumber[this.prop] ? "" : "px"), e.queue = this.options.queue, e.elem = this.elem, e.saveState = function () {
f.options.hide && K._data(f.elem, "fxshow" + f.prop) === b && K._data(f.elem, "fxshow" + f.prop, f.start)
}, e() && K.timers.push(e) && !rc && (rc = setInterval(g.tick, g.interval))
},
show: function () {
var a = K._data(this.elem, "fxshow" + this.prop);
this.options.orig[this.prop] = a || K.style(this.elem, this.prop), this.options.show = !0, a !== b ? this.custom(this.cur(), a) : this.custom("width" === this.prop || "height" === this.prop ? 1 : 0, this.cur()), K(this.elem).show()
},
hide: function () {
this.options.orig[this.prop] = K._data(this.elem, "fxshow" + this.prop) || K.style(this.elem, this.prop), this.options.hide = !0, this.custom(this.cur(), 0)
},
step: function (a) {
var b, c, d, e = sc || C(),
f = !0,
g = this.elem,
h = this.options;
if (a || e >= h.duration + this.startTime) {
this.now = this.end, this.pos = this.state = 1, this.update(), h.animatedProperties[this.prop] = !0;
for (b in h.animatedProperties) h.animatedProperties[b] !== !0 && (f = !1);
if (f) {
if (null == h.overflow || K.support.shrinkWrapBlocks || K.each(["", "X", "Y"], function (a, b) {
g.style["overflow" + b] = h.overflow[a]
}), h.hide && K(g).hide(), h.hide || h.show)
for (b in h.animatedProperties) K.style(g, b, h.orig[b]), K.removeData(g, "fxshow" + b, !0), K.removeData(g, "toggle" + b, !0);
d = h.complete, d && (h.complete = !1, d.call(g))
}
return !1
}
return 1 / 0 == h.duration ? this.now = e : (c = e - this.startTime, this.state = c / h.duration, this.pos = K.easing[h.animatedProperties[this.prop]](this.state, c, 0, 1, h.duration), this.now = this.start + (this.end - this.start) * this.pos), this.update(), !0
}
}, K.extend(K.fx, {
tick: function () {
for (var a, b = K.timers, c = 0; c < b.length; c++) a = b[c], a() || b[c] !== a || b.splice(c--, 1);
b.length || K.fx.stop()
},
interval: 13,
stop: function () {
clearInterval(rc), rc = null
},
speeds: {
slow: 600,
fast: 200,
_default: 400
},
step: {
opacity: function (a) {
K.style(a.elem, "opacity", a.now)
},
_default: function (a) {
a.elem.style && null != a.elem.style[a.prop] ? a.elem.style[a.prop] = a.now + a.unit : a.elem[a.prop] = a.now
}
}
}), K.each(["width", "height"], function (a, b) {
K.fx.step[b] = function (a) {
K.style(a.elem, b, Math.max(0, a.now) + a.unit)
}
}), K.expr && K.expr.filters && (K.expr.filters.animated = function (a) {
return K.grep(K.timers, function (b) {
return a === b.elem
}).length
});
var xc = /^t(?:able|d|h)$/i,
yc = /^(?:body|html)$/i;
K.fn.offset = "getBoundingClientRect" in H.documentElement ? function (a) {
var b, c = this[0];
if (a) return this.each(function (b) {
K.offset.setOffset(this, a, b)
});
if (!c || !c.ownerDocument) return null;
if (c === c.ownerDocument.body) return K.offset.bodyOffset(c);
try {
b = c.getBoundingClientRect()
} catch (d) {}
var e = c.ownerDocument,
f = e.documentElement;
if (!b || !K.contains(f, c)) return b ? {
top: b.top,
left: b.left
} : {
top: 0,
left: 0
};
var g = e.body,
h = G(e),
i = f.clientTop || g.clientTop || 0,
j = f.clientLeft || g.clientLeft || 0,
k = h.pageYOffset || K.support.boxModel && f.scrollTop || g.scrollTop,
l = h.pageXOffset || K.support.boxModel && f.scrollLeft || g.scrollLeft,
m = b.top + k - i,
n = b.left + l - j;
return {
top: m,
left: n
}
} : function (a) {
var b = this[0];
if (a) return this.each(function (b) {
K.offset.setOffset(this, a, b)
});
if (!b || !b.ownerDocument) return null;
if (b === b.ownerDocument.body) return K.offset.bodyOffset(b);
for (var c, d = b.offsetParent, e = b, f = b.ownerDocument, g = f.documentElement, h = f.body, i = f.defaultView, j = i ? i.getComputedStyle(b, null) : b.currentStyle, k = b.offsetTop, l = b.offsetLeft;
(b = b.parentNode) && b !== h && b !== g && (!K.support.fixedPosition || "fixed" !== j.position);) c = i ? i.getComputedStyle(b, null) : b.currentStyle, k -= b.scrollTop, l -= b.scrollLeft, b === d && (k += b.offsetTop, l += b.offsetLeft, !K.support.doesNotAddBorder || K.support.doesAddBorderForTableAndCells && xc.test(b.nodeName) || (k += parseFloat(c.borderTopWidth) || 0, l += parseFloat(c.borderLeftWidth) || 0), e = d, d = b.offsetParent), K.support.subtractsBorderForOverflowNotVisible && "visible" !== c.overflow && (k += parseFloat(c.borderTopWidth) || 0, l += parseFloat(c.borderLeftWidth) || 0), j = c;
return ("relative" === j.position || "static" === j.position) && (k += h.offsetTop, l += h.offsetLeft), K.support.fixedPosition && "fixed" === j.position && (k += Math.max(g.scrollTop, h.scrollTop), l += Math.max(g.scrollLeft, h.scrollLeft)), {
top: k,
left: l
}
}, K.offset = {
bodyOffset: function (a) {
var b = a.offsetTop,
c = a.offsetLeft;
return K.support.doesNotIncludeMarginInBodyOffset && (b += parseFloat(K.css(a, "marginTop")) || 0, c += parseFloat(K.css(a, "marginLeft")) || 0), {
top: b,
left: c
}
},
setOffset: function (a, b, c) {
var d = K.css(a, "position");
"static" === d && (a.style.position = "relative");
var e, f, g = K(a),
h = g.offset(),
i = K.css(a, "top"),
j = K.css(a, "left"),
k = ("absolute" === d || "fixed" === d) && K.inArray("auto", [i, j]) > -1,
l = {}, m = {};
k ? (m = g.position(), e = m.top, f = m.left) : (e = parseFloat(i) || 0, f = parseFloat(j) || 0), K.isFunction(b) && (b = b.call(a, c, h)), null != b.top && (l.top = b.top - h.top + e), null != b.left && (l.left = b.left - h.left + f), "using" in b ? b.using.call(a, l) : g.css(l)
}
}, K.fn.extend({
position: function () {
if (!this[0]) return null;
var a = this[0],
b = this.offsetParent(),
c = this.offset(),
d = yc.test(b[0].nodeName) ? {
top: 0,
left: 0
} : b.offset();
return c.top -= parseFloat(K.css(a, "marginTop")) || 0, c.left -= parseFloat(K.css(a, "marginLeft")) || 0, d.top += parseFloat(K.css(b[0], "borderTopWidth")) || 0, d.left += parseFloat(K.css(b[0], "borderLeftWidth")) || 0, {
top: c.top - d.top,
left: c.left - d.left
}
},
offsetParent: function () {
return this.map(function () {
for (var a = this.offsetParent || H.body; a && !yc.test(a.nodeName) && "static" === K.css(a, "position");) a = a.offsetParent;
return a
})
}
}), K.each(["Left", "Top"], function (a, c) {
var d = "scroll" + c;
K.fn[d] = function (c) {
var e, f;
return c === b ? (e = this[0]) ? (f = G(e), f ? "pageXOffset" in f ? f[a ? "pageYOffset" : "pageXOffset"] : K.support.boxModel && f.document.documentElement[d] || f.document.body[d] : e[d]) : null : this.each(function () {
f = G(this), f ? f.scrollTo(a ? K(f).scrollLeft() : c, a ? c : K(f).scrollTop()) : this[d] = c
})
}
}), K.each(["Height", "Width"], function (a, c) {
var d = c.toLowerCase();
K.fn["inner" + c] = function () {
var a = this[0];
return a ? a.style ? parseFloat(K.css(a, d, "padding")) : this[d]() : null
}, K.fn["outer" + c] = function (a) {
var b = this[0];
return b ? b.style ? parseFloat(K.css(b, d, a ? "margin" : "border")) : this[d]() : null
}, K.fn[d] = function (a) {
var e = this[0];
if (!e) return null == a ? null : this;
if (K.isFunction(a)) return this.each(function (b) {
var c = K(this);
c[d](a.call(this, b, c[d]()))
});
if (K.isWindow(e)) {
var f = e.document.documentElement["client" + c],
g = e.document.body;
return "CSS1Compat" === e.document.compatMode && f || g && g["client" + c] || f
}
if (9 === e.nodeType) return Math.max(e.documentElement["client" + c], e.body["scroll" + c], e.documentElement["scroll" + c], e.body["offset" + c], e.documentElement["offset" + c]);
if (a === b) {
var h = K.css(e, d),
i = parseFloat(h);
return K.isNumeric(i) ? i : h
}
return this.css(d, "string" == typeof a ? a : a + "px")
}
}), a.jQuery = a.$ = K, "function" == typeof define && define.amd && define.amd.jQuery && define("jquery", [], function () {
return K
})
}(window), "undefined" != typeof window.$ && (window.$.fn.prettyDate = function () {
return this.each(function () {
var a = prettyDate(this.getAttribute("pubdate"));
a && $(this).text(a)
})
}), Array.prototype.indexOf || (Array.prototype.indexOf = function (a) {
"use strict";
if (null == this) throw new TypeError;
var b = Object(this),
c = b.length >>> 0;
if (0 === c) return -1;
var d = 0;
if (arguments.length > 0 && (d = Number(arguments[1]), d != d ? d = 0 : 0 != d && 1 / 0 != d && d != -1 / 0 && (d = (d > 0 || -1) * Math.floor(Math.abs(d)))), d >= c) return -1;
for (var e = d >= 0 ? d : Math.max(c - Math.abs(d), 0); c > e; e++)
if (e in b && b[e] === a) return e;
return -1
}), Array.prototype.forEach || (Array.prototype.forEach = function (a, b) {
var c, d;
if (null == this) throw new TypeError(" this is null or not defined");
var e = Object(this),
f = e.length >>> 0;
if ("[object Function]" != {}.toString.call(a)) throw new TypeError(a + " is not a function");
for (b && (c = b), d = 0; f > d;) {
var g;
d in e && (g = e[d], a.call(c, g, d, e)), d++
}
}), "".trim || (String.prototype.trim = function () {
return this.replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, "")
}), Object.prototype.hasOwnProperty || (Object.prototype.hasOwnProperty = function (a) {
var b = obj.__proto__ || obj.constructor.prototype;
return a in this && (!(a in b) || b[a] !== this[a])
}),
function () {
function a() {}
var b = [].slice;
Function.prototype.bind || (Function.prototype.bind = function (c) {
var d = this;
if ("function" != typeof d) throw new TypeError("Function.prototype.bind called on incompatible " + d);
var e = b.call(arguments, 1),
f = function () {
if (this instanceof f) {
var a = d.apply(this, e.concat(b.call(arguments)));
return Object(a) === a ? a : this
}
return d.apply(c, e.concat(b.call(arguments)))
};
return d.prototype && (a.prototype = d.prototype, f.prototype = new a, a.prototype = null), f
})
}();
var JSHINT = function () {
"use strict";

function a() {}

function b(a, b) {
return Object.prototype.hasOwnProperty.call(a, b)
}

function c(a, b) {
void 0 === Vb[a] && void 0 === Ub[a] && m("Bad option: '" + a + "'.", b)
}

function d(a) {
return "[object String]" === Object.prototype.toString.call(a)
}

function e(a) {
return a >= "a" && "z￿" >= a || a >= "A" && "Z￿" >= a
}

function f(a) {
return a >= "0" && "9" >= a
}

function g(a, b) {
return a.replace(/\{([^{}]*)\}/g, function (a, c) {
var d = b[c];
return "string" == typeof d || "number" == typeof d ? d : a
})
}

function h(a, c) {
var d;
for (d in c) b(c, d) && !b(JSHINT.blacklist, d) && (a[d] = c[d])
}

function i() {
Object.keys(JSHINT.blacklist).forEach(function (a) {
delete xb[a]
})
}

function j() {
wb.couch && h(xb, Zb), wb.rhino && h(xb, fc), wb.prototypejs && h(xb, ec), wb.node && (h(xb, dc), wb.globalstrict = !0), wb.devel && h(xb, $b), wb.dojo && h(xb, _b), wb.browser && h(xb, Yb), wb.nonstandard && h(xb, hc), wb.jquery && h(xb, bc), wb.mootools && h(xb, cc), wb.worker && h(xb, jc), wb.wsh && h(xb, kc), wb.esnext && Ib(), wb.globalstrict && wb.strict !== !1 && (wb.strict = !0)
}

function k(a, b, c) {
var d = Math.floor(100 * (b / qb.length));
throw {
name: "JSHintError",
line: b,
character: c,
message: a + " (" + d + "% scanned).",
raw: a
}
}

function l(a, b, c, d) {
return JSHINT.undefs.push([a, b, c, d])
}

function m(a, b, c, d, e, f) {
var h, i, j;
return b = b || ub, "(end)" === b.id && (b = Fb), i = b.line || 0, h = b.from || 0, j = {
id: "(error)",
raw: a,
evidence: qb[i - 1] || "",
line: i,
character: h,
scope: JSHINT.scope,
a: c,
b: d,
c: e,
d: f
}, j.reason = g(a, j), JSHINT.errors.push(j), wb.passfail && k("Stopping. ", i, h), Jb += 1, Jb >= wb.maxerr && k("Too many errors.", i, h), j
}

function n(a, b, c, d, e, f, g) {
return m(a, {
line: b,
from: c
}, d, e, f, g)
}

function o(a, b, c, d, e, f) {
m(a, b, c, d, e, f)
}

function p(a, b, c, d, e, f, g) {
return o(a, {
line: b,
from: c
}, d, e, f, g)
}

function q(a, b) {
var c;
return c = {
id: "(internal)",
elem: a,
value: b
}, JSHINT.internals.push(c), c
}

function r(a, c, d) {
"hasOwnProperty" === a && m("'hasOwnProperty' is a really bad name."), b(jb, a) && !jb["(global)"] && (jb[a] === !0 ? wb.latedef && m("'{a}' was used before it was defined.", ub, a) : wb.shadow || "exception" === c || m("'{a}' is already defined.", ub, a)), jb[a] = c, d && (jb["(tokens)"][a] = d), jb["(global)"] ? (lb[a] = jb, b(mb, a) && (wb.latedef && m("'{a}' was used before it was defined.", ub, a), delete mb[a])) : Bb[a] = jb
}

function s() {
var a, d, e, f, g, k, l, m = ub,
n = m.value,
p = wb.quotmark,
q = {};
switch (n) {
case "*/":
o("Unbegun comment.");
break;
case "/*members":
case "/*member":
n = "/*members", tb || (tb = {}), d = tb, wb.quotmark = !1;
break;
case "/*jshint":
case "/*jslint":
d = wb, e = Ub;
break;
case "/*global":
d = q;
break;
default:
o("What?")
}
f = lc.token();
a: for (;;) {
for (l = !1;;) {
if ("special" === f.type && "*/" === f.value) break a;
if ("(endline)" !== f.id && "," !== f.id) break;
f = lc.token()
}
if ("/*global" === n && "-" === f.value && (l = !0, f = lc.token()), "(string)" !== f.type && "(identifier)" !== f.type && "/*members" !== n && o("Bad option.", f), k = lc.token(), ":" === k.id) {
if (k = lc.token(), d === tb && o("Expected '{a}' and instead saw '{b}'.", f, "*/", ":"), "/*jshint" === n && c(f.value, f), "indent" !== f.value || "/*jshint" !== n && "/*jslint" !== n)
if ("maxerr" !== f.value || "/*jshint" !== n && "/*jslint" !== n)
if ("maxlen" !== f.value || "/*jshint" !== n && "/*jslint" !== n)
if ("validthis" === f.value) jb["(global)"] ? o("Option 'validthis' can't be used in a global scope.") : "true" === k.value || "false" === k.value ? d[f.value] = "true" === k.value : o("Bad option value.", k);
else if ("quotmark" === f.value && "/*jshint" === n) switch (k.value) {
case "true":
d.quotmark = !0;
break;
case "false":
d.quotmark = !1;
break;
case "double":
case "single":
d.quotmark = k.value;
break;
default:
o("Bad option value.", k)
} else "true" === k.value || "false" === k.value ? ("/*jslint" === n ? (g = Xb[f.value] || f.value, d[g] = "true" === k.value, void 0 !== Wb[g] && (d[g] = !d[g])) : d[f.value] = "true" === k.value, "newcap" === f.value && (d["(explicitNewcap)"] = !0)) : o("Bad option value.", k);
else a = +k.value, ("number" != typeof a || !isFinite(a) || 0 >= a || Math.floor(a) !== a) && o("Expected a small integer and instead saw '{a}'.", k, k.value), d.maxlen = a;
else a = +k.value, ("number" != typeof a || !isFinite(a) || 0 >= a || Math.floor(a) !== a) && o("Expected a small integer and instead saw '{a}'.", k, k.value), d.maxerr = a;
else a = +k.value, ("number" != typeof a || !isFinite(a) || 0 >= a || Math.floor(a) !== a) && o("Expected a small integer and instead saw '{a}'.", k, k.value), d.white = !0, d.indent = a;
f = lc.token()
} else("/*jshint" === n || "/*jslint" === n) && o("Missing option value.", f), d[f.value] = !1, "/*global" === n && l === !0 && (JSHINT.blacklist[f.value] = f.value, i()), f = k
}
"/*members" === n && (wb.quotmark = p),
h(xb, q);
for (var r in q) b(q, r) && (ib[r] = m);
e && j()
}

function t(a) {
for (var b, c = a || 0, d = 0; c >= d;) b = rb[d], b || (b = rb[d] = lc.token()), d += 1;
return b
}

function u(a, b) {
switch (Fb.id) {
case "(number)":
"." === ub.id && m("A dot following a number can be confused with a decimal point.", Fb);
break;
case "-":
("-" === ub.id || "--" === ub.id) && m("Confusing minusses.");
break;
case "+":
("+" === ub.id || "++" === ub.id) && m("Confusing plusses.")
}
for (("(string)" === Fb.type || Fb.identifier) && (hb = Fb.value), a && ub.id !== a && (b ? "(end)" === ub.id ? m("Unmatched '{a}'.", b, b.id) : m("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.", ub, a, b.id, b.line, ub.value) : ("(identifier)" !== ub.type || ub.value !== a) && m("Expected '{a}' and instead saw '{b}'.", ub, a, ub.value)), zb = Fb, Fb = ub;;) {
if (ub = rb.shift() || lc.token(), "(end)" === ub.id || "(error)" === ub.id) return;
if ("special" === ub.type) s();
else if ("(endline)" !== ub.id) break
}
}

function v(a, b) {
var c, d = !1,
e = !1;
if ("(end)" === ub.id && o("Unexpected early end of program.", Fb), u(), b && (hb = "anonymous", jb["(verb)"] = Fb.value), b === !0 && Fb.fud) c = Fb.fud();
else {
if (Fb.nud) c = Fb.nud();
else {
if ("(number)" === ub.type && "." === Fb.id) return m("A leading decimal point can be confused with a dot: '.{a}'.", Fb, ub.value), u(), Fb;
o("Expected an identifier and instead saw '{a}'.", Fb, Fb.id)
}
for (; a < ub.lbp;) d = "Array" === Fb.value, e = "Object" === Fb.value, c && (c.value || c.first && c.first.value) && ("new" !== c.value || c.first && c.first.value && "." === c.first.value) && (d = !1, c.value !== Fb.value && (e = !1)), u(), d && "(" === Fb.id && ")" === ub.id && m("Use the array literal notation [].", Fb), e && "(" === Fb.id && ")" === ub.id && m("Use the object literal notation {}.", Fb), Fb.led ? c = Fb.led(c) : o("Expected an operator and instead saw '{a}'.", Fb, Fb.id)
}
return c
}

function w(a, b) {
a = a || Fb, b = b || ub, wb.white && a.character !== b.from && a.line === b.line && (a.from += a.character - a.from, m("Unexpected space after '{a}'.", a, a.value))
}

function x(a, b) {
a = a || Fb, b = b || ub, !wb.white || a.character === b.from && a.line === b.line || m("Unexpected space before '{a}'.", b, b.value)
}

function y(a, b) {
a = a || Fb, b = b || ub, wb.white && !a.comment && a.line === b.line && w(a, b)
}

function z(a, b) {
if (wb.white) {
if (a = a || Fb, b = b || ub, ";" === a.value && ";" === b.value) return;
a.line === b.line && a.character === b.from && (a.from += a.character - a.from, m("Missing space after '{a}'.", a, a.value))
}
}

function A(a, b) {
a = a || Fb, b = b || ub, wb.laxbreak || a.line === b.line ? wb.white && (a = a || Fb, b = b || ub, a.character === b.from && (a.from += a.character - a.from, m("Missing space after '{a}'.", a, a.value))) : m("Bad line breaking before '{a}'.", b, b.id)
}

function B(a) {
var b;
wb.white && "(end)" !== ub.id && (b = ob + (a || 0), ub.from !== b && m("Expected '{a}' to have an indentation at {b} instead at {c}.", ub, ub.value, b, ub.from))
}

function C(a) {
a = a || Fb, a.line !== ub.line && m("Line breaking error '{a}'.", a, a.value)
}

function D() {
Fb.line !== ub.line ? wb.laxcomma || (D.first && (m("Comma warnings can be turned off with 'laxcomma'"), D.first = !1), m("Bad line breaking before '{a}'.", Fb, ub.id)) : !Fb.comment && Fb.character !== ub.from && wb.white && (Fb.from += Fb.character - Fb.from, m("Unexpected space after '{a}'.", Fb, Fb.value)), u(","), z(Fb, ub)
}

function E(a, b) {
var c = ic[a];
return c && "object" == typeof c || (ic[a] = c = {
id: a,
lbp: b,
value: a
}), c
}

function F(a) {
return E(a, 0)
}

function G(a, b) {
var c = F(a);
return c.identifier = c.reserved = !0, c.fud = b, c
}

function H(a, b) {
var c = G(a, b);
return c.block = !0, c
}

function I(a) {
var b = a.id.charAt(0);
return (b >= "a" && "z" >= b || b >= "A" && "Z" >= b) && (a.identifier = a.reserved = !0), a
}

function J(a, b) {
var c = E(a, 150);
return I(c), c.nud = "function" == typeof b ? b : function () {
return this.right = v(150), this.arity = "unary", ("++" === this.id || "--" === this.id) && (wb.plusplus ? m("Unexpected use of '{a}'.", this, this.id) : this.right.identifier && !this.right.reserved || "." === this.right.id || "[" === this.right.id || m("Bad operand.", this)), this
}, c
}

function K(a, b) {
var c = F(a);
return c.type = a, c.nud = b, c
}

function L(a, b) {
var c = K(a, b);
return c.identifier = c.reserved = !0, c
}

function M(a, b) {
return L(a, function () {
return "function" == typeof b && b(this), this
})
}

function N(a, b, c, d) {
var e = E(a, c);
return I(e), e.led = function (e) {
return d || (A(zb, Fb), z(Fb, ub)), "in" === a && "!" === e.id && m("Confusing use of '{a}'.", e, "!"), "function" == typeof b ? b(e, this) : (this.left = e, this.right = v(c), this)
}, e
}

function O(a, b) {
var c = E(a, 100);
return c.led = function (a) {
A(zb, Fb), z(Fb, ub);
var c = v(100);
return a && "NaN" === a.id || c && "NaN" === c.id ? m("Use the isNaN function to compare with NaN.", this) : b && b.apply(this, [a, c]), "!" === a.id && m("Confusing use of '{a}'.", a, "!"), "!" === c.id && m("Confusing use of '{a}'.", c, "!"), this.left = a, this.right = c, this
}, c
}

function P(a) {
return a && ("(number)" === a.type && 0 === +a.value || "(string)" === a.type && "" === a.value || "null" === a.type && !wb.eqnull || "true" === a.type || "false" === a.type || "undefined" === a.type)
}

function Q(a) {
return E(a, 20).exps = !0, N(a, function (a, b) {
if (b.left = a, xb[a.value] === !1 && Bb[a.value]["(global)"] === !0 ? m("Read only.", a) : a["function"] && m("'{a}' is a function.", a, a.value), a) {
if (wb.esnext && "const" === jb[a.value] && m("Attempting to override '{a}' which is a constant", a, a.value), "." === a.id || "[" === a.id) return a.left && "arguments" !== a.left.value || m("Bad assignment.", b), b.right = v(19), b;
if (a.identifier && !a.reserved) return "exception" === jb[a.value] && m("Do not assign to the exception parameter.", a), b.right = v(19), b;
a === ic["function"] && m("Expected an identifier in an assignment and instead saw a function invocation.", Fb)
}
o("Bad assignment.", b)
}, 20)
}

function R(a, b, c) {
var d = E(a, c);
return I(d), d.led = "function" == typeof b ? b : function (a) {
return wb.bitwise && m("Unexpected use of '{a}'.", this, this.id), this.left = a, this.right = v(c), this
}, d
}

function S(a) {
return E(a, 20).exps = !0, N(a, function (a, b) {
return wb.bitwise && m("Unexpected use of '{a}'.", b, b.id), z(zb, Fb), z(Fb, ub), a ? "." === a.id || "[" === a.id || a.identifier && !a.reserved ? (v(19), b) : (a === ic["function"] && m("Expected an identifier in an assignment, and instead saw a function invocation.", Fb), b) : (o("Bad assignment.", b), void 0)
}, 20)
}

function T(a) {
var b = E(a, 150);
return b.led = function (a) {
return wb.plusplus ? m("Unexpected use of '{a}'.", this, this.id) : a.identifier && !a.reserved || "." === a.id || "[" === a.id || m("Bad operand.", this), this.left = a, this
}, b
}

function U(a) {
return ub.identifier ? (u(), Fb.reserved && !wb.es5 && (a && "undefined" === Fb.value || m("Expected an identifier and instead saw '{a}' (a reserved word).", Fb, Fb.id)), Fb.value) : void 0
}

function V(a) {
var b = U(a);
return b ? b : ("function" === Fb.id && "(" === ub.id ? m("Missing name in function declaration.") : o("Expected an identifier and instead saw '{a}'.", ub, ub.value), void 0)
}

function W(a) {
var b, c = 0;
if (";" === ub.id && !vb)
for (;;) {
if (b = t(c), b.reach) return;
if ("(endline)" !== b.id) {
if ("function" === b.id) {
if (!wb.latedef) break;
m("Inner functions should be listed at the top of the outer function.", b);
break
}
m("Unreachable '{a}' after '{b}'.", b, b.value, a);
break
}
c += 1
}
}

function X(a) {
var b, c = ob,
d = Bb,
e = ub;
if (";" === e.id) return u(";"), void 0;
if (e.identifier && !e.reserved && ":" === t().id && (u(), u(":"), Bb = Object.create(d), r(e.value, "label"), ub.labelled || "{" === ub.value || m("Label '{a}' on {b} statement.", ub, e.value, ub.value), Rb.test(e.value + ":") && m("Label '{a}' looks like a javascript url.", e, e.value), ub.label = e.value, e = ub), "{" === e.id) return $(!0, !0), void 0;
if (a || B(), b = v(0, !0), !e.block) {
if (wb.expr || b && b.exps ? wb.nonew && "(" === b.id && "new" === b.left.id && m("Do not use 'new' for side effects.", e) : m("Expected an assignment or function call and instead saw an expression.", Fb), "," === ub.id) return D();
";" !== ub.id ? wb.asi || wb.lastsemic && "}" === ub.id && ub.line === Fb.line || n("Missing semicolon.", Fb.line, Fb.character) : (w(Fb, ub), u(";"), z(Fb, ub))
}
return ob = c, Bb = d, b
}

function Y(a) {
for (var b, c = []; !ub.reach && "(end)" !== ub.id;) ";" === ub.id ? (b = t(), b && "(" === b.id || m("Unnecessary semicolon."), u(";")) : c.push(X(a === ub.line));
return c
}

function Z() {
for (var a, b, c;
"(string)" === ub.id;) {
if (b = t(0), "(endline)" === b.id) {
a = 1;
do c = t(a), a += 1; while ("(endline)" === c.id);
if (";" !== c.id) {
if ("(string)" !== c.id && "(number)" !== c.id && "(regexp)" !== c.id && c.identifier !== !0 && "}" !== c.id) break;
m("Missing semicolon.", ub)
} else b = c
} else if ("}" === b.id) m("Missing semicolon.", b);
else if (";" !== b.id) break;
B(), u(), Db[Fb.value] && m('Unnecessary directive "{a}".', Fb, Fb.value), "use strict" === Fb.value && (wb["(explicitNewcap)"] || (wb.newcap = !0), wb.undef = !0), Db[Fb.value] = !0, ";" === b.id && u(";")
}
}

function $(a, c, d) {
var e, f, g, h, i, j = nb,
k = ob,
l = Bb;
nb = a, a && wb.funcscope || (Bb = Object.create(Bb)), z(Fb, ub), g = ub;
var n = jb["(metrics)"];
if (n.nestedBlockDepth += 1, n.verifyMaxNestedBlockDepthPerFunction(), "{" === ub.id) {
if (u("{"), h = Fb.line, "}" !== ub.id) {
for (ob += wb.indent; !a && ub.from > ob;) ob += wb.indent;
if (d) {
f = {};
for (i in Db) b(Db, i) && (f[i] = Db[i]);
Z(), wb.strict && jb["(context)"]["(global)"] && (f["use strict"] || Db["use strict"] || m('Missing "use strict" statement.'))
}
e = Y(h), n.statementCount += e.length, d && (Db = f), ob -= wb.indent, h !== ub.line && B()
} else h !== ub.line && B();
u("}", g), ob = k
} else a ? ((!c || wb.curly) && m("Expected '{a}' and instead saw '{b}'.", ub, "{", ub.value), vb = !0, ob += wb.indent, e = [X(ub.line === Fb.line)], ob -= wb.indent, vb = !1) : o("Expected '{a}' and instead saw '{b}'.", ub, "{", ub.value);
return jb["(verb)"] = null, a && wb.funcscope || (Bb = l), nb = j, !a || !wb.noempty || e && 0 !== e.length || m("Empty block."), n.nestedBlockDepth -= 1, e
}

function _(a) {
tb && "boolean" != typeof tb[a] && m("Unexpected /*member '{a}'.", Fb, a), "number" == typeof sb[a] ? sb[a] += 1 : sb[a] = 1
}

function ab(a) {
var b = a.value,
c = a.line,
d = mb[b];
"function" == typeof d && (d = !1), d ? d[d.length - 1] !== c && d.push(c) : (d = [c], mb[b] = d)
}

function bb() {
var a = U(!0);
return a || ("(string)" === ub.id ? (a = ub.value, u()) : "(number)" === ub.id && (a = ub.value.toString(), u())), a
}

function cb() {
var a, b = ub,
c = [];
if (u("("), y(), ")" === ub.id) return u(")"), void 0;
for (;;) {
if (a = V(!0), c.push(a), r(a, "unused", Fb), "," !== ub.id) return u(")", b), y(zb, Fb), c;
D()
}
}

function db(a, b) {
var c, d = wb,
e = Bb;
return wb = Object.create(wb), Bb = Object.create(Bb), jb = {
"(name)": a || '"' + hb + '"',
"(line)": ub.line,
"(character)": ub.character,
"(context)": jb,
"(breakage)": 0,
"(loopage)": 0,
"(metrics)": eb(ub),
"(scope)": Bb,
"(statement)": b,
"(tokens)": {}
}, c = jb, Fb.funct = jb, kb.push(jb), a && r(a, "function"), jb["(params)"] = cb(), jb["(metrics)"].verifyMaxParametersPerFunction(jb["(params)"]), $(!1, !1, !0), jb["(metrics)"].verifyMaxStatementsPerFunction(), jb["(metrics)"].verifyMaxComplexityPerFunction(), Bb = e, wb = d, jb["(last)"] = Fb.line, jb["(lastcharacter)"] = Fb.character, jb = jb["(context)"], c
}

function eb(a) {
return {
statementCount: 0,
nestedBlockDepth: -1,
ComplexityCount: 1,
verifyMaxStatementsPerFunction: function () {
if (wb.maxstatements && this.statementCount > wb.maxstatements) {
var b = "Too many statements per function (" + this.statementCount + ").";
m(b, a)
}
},
verifyMaxParametersPerFunction: function (b) {
if (wb.maxparams && b.length > wb.maxparams) {
var c = "Too many parameters per function (" + b.length + ").";
m(c, a)
}
},
verifyMaxNestedBlockDepthPerFunction: function () {
if (wb.maxdepth && this.nestedBlockDepth > 0 && this.nestedBlockDepth === wb.maxdepth + 1) {
var a = "Blocks are nested too deeply (" + this.nestedBlockDepth + ").";
m(a)
}
},
verifyMaxComplexityPerFunction: function () {
var b = wb.maxcomplexity,
c = this.ComplexityCount;
if (b && c > b) {
var d = "Cyclomatic complexity is too high per function (" + c + ").";
m(d, a)
}
}
}
}

function fb() {
jb["(metrics)"].ComplexityCount += 1
}

function gb() {
function a() {
var a = {}, b = ub;
if (u("{"), "}" !== ub.id)
for (;;) {
if ("(end)" === ub.id) o("Missing '}' to match '{' from line {a}.", ub, b.line);
else {
if ("}" === ub.id) {
m("Unexpected comma.", Fb);
break
}
"," === ub.id ? o("Unexpected comma.", ub) : "(string)" !== ub.id && m("Expected a string and instead saw {a}.", ub, ub.value)
} if (a[ub.value] === !0 ? m("Duplicate key '{a}'.", ub, ub.value) : "__proto__" === ub.value && !wb.proto || "__iterator__" === ub.value && !wb.iterator ? m("The '{a}' key may produce unexpected results.", ub, ub.value) : a[ub.value] = !0, u(), u(":"), gb(), "," !== ub.id) break;
u(",")
}
u("}")
}

function b() {
var a = ub;
if (u("["), "]" !== ub.id)
for (;;) {
if ("(end)" === ub.id) o("Missing ']' to match '[' from line {a}.", ub, a.line);
else {
if ("]" === ub.id) {
m("Unexpected comma.", Fb);
break
}
"," === ub.id && o("Unexpected comma.", ub)
} if (gb(), "," !== ub.id) break;
u(",")
}
u("]")
}
switch (ub.id) {
case "{":
a();
break;
case "[":
b();
break;
case "true":
case "false":
case "null":
case "(number)":
case "(string)":
u();
break;
case "-":
u("-"), Fb.character !== ub.from && m("Unexpected space after '-'.", Fb), w(Fb, ub), u("(number)");
break;
default:
o("Expected a JSON value.", ub)
}
}
var hb, ib, jb, kb, lb, mb, nb, ob, pb, qb, rb, sb, tb, ub, vb, wb, xb, yb, zb, Ab, Bb, Cb, Db, Eb, Fb, Gb, Hb, Ib, Jb, Kb, Lb, Mb, Nb, Ob, Pb, Qb, Rb, Sb, Tb = {
"<": !0,
"<=": !0,
"==": !0,
"===": !0,
"!==": !0,
"!=": !0,
">": !0,
">=": !0,
"+": !0,
"-": !0,
"*": !0,
"/": !0,
"%": !0
}, Ub = {
asi: !0,
bitwise: !0,
boss: !0,
browser: !0,
camelcase: !0,
couch: !0,
curly: !0,
debug: !0,
devel: !0,
dojo: !0,
eqeqeq: !0,
eqnull: !0,
es5: !0,
esnext: !0,
evil: !0,
expr: !0,
forin: !0,
funcscope: !0,
globalstrict: !0,
immed: !0,
iterator: !0,
jquery: !0,
lastsemic: !0,
latedef: !0,
laxbreak: !0,
laxcomma: !0,
loopfunc: !0,
mootools: !0,
multistr: !0,
newcap: !0,
noarg: !0,
node: !0,
noempty: !0,
nonew: !0,
nonstandard: !0,
nomen: !0,
onevar: !0,
onecase: !0,
passfail: !0,
plusplus: !0,
proto: !0,
prototypejs: !0,
regexdash: !0,
regexp: !0,
rhino: !0,
undef: !0,
unused: !0,
scripturl: !0,
shadow: !0,
smarttabs: !0,
strict: !0,
sub: !0,
supernew: !0,
trailing: !0,
validthis: !0,
withstmt: !0,
white: !0,
worker: !0,
wsh: !0
}, Vb = {
maxlen: !1,
indent: !1,
maxerr: !1,
predef: !1,
quotmark: !1,
scope: !1,
maxstatements: !1,
maxdepth: !1,
maxparams: !1,
maxcomplexity: !1
}, Wb = {
bitwise: !0,
forin: !0,
newcap: !0,
nomen: !0,
plusplus: !0,
regexp: !0,
undef: !0,
white: !0,
eqeqeq: !0,
onevar: !0
}, Xb = {
eqeq: "eqeqeq",
vars: "onevar",
windows: "wsh"
}, Yb = {
ArrayBuffer: !1,
ArrayBufferView: !1,
Audio: !1,
addEventListener: !1,
applicationCache: !1,
atob: !1,
blur: !1,
btoa: !1,
clearInterval: !1,
clearTimeout: !1,
close: !1,
closed: !1,
DataView: !1,
DOMParser: !1,
defaultStatus: !1,
document: !1,
event: !1,
FileReader: !1,
Float32Array: !1,
Float64Array: !1,
FormData: !1,
focus: !1,
frames: !1,
getComputedStyle: !1,
HTMLElement: !1,
HTMLAnchorElement: !1,
HTMLBaseElement: !1,
HTMLBlockquoteElement: !1,
HTMLBodyElement: !1,
HTMLBRElement: !1,
HTMLButtonElement: !1,
HTMLCanvasElement: !1,
HTMLDirectoryElement: !1,
HTMLDivElement: !1,
HTMLDListElement: !1,
HTMLFieldSetElement: !1,
HTMLFontElement: !1,
HTMLFormElement: !1,
HTMLFrameElement: !1,
HTMLFrameSetElement: !1,
HTMLHeadElement: !1,
HTMLHeadingElement: !1,
HTMLHRElement: !1,
HTMLHtmlElement: !1,
HTMLIFrameElement: !1,
HTMLImageElement: !1,
HTMLInputElement: !1,
HTMLIsIndexElement: !1,
HTMLLabelElement: !1,
HTMLLayerElement: !1,
HTMLLegendElement: !1,
HTMLLIElement: !1,
HTMLLinkElement: !1,
HTMLMapElement: !1,
HTMLMenuElement: !1,
HTMLMetaElement: !1,
HTMLModElement: !1,
HTMLObjectElement: !1,
HTMLOListElement: !1,
HTMLOptGroupElement: !1,
HTMLOptionElement: !1,
HTMLParagraphElement: !1,
HTMLParamElement: !1,
HTMLPreElement: !1,
HTMLQuoteElement: !1,
HTMLScriptElement: !1,
HTMLSelectElement: !1,
HTMLStyleElement: !1,
HTMLTableCaptionElement: !1,
HTMLTableCellElement: !1,
HTMLTableColElement: !1,
HTMLTableElement: !1,
HTMLTableRowElement: !1,
HTMLTableSectionElement: !1,
HTMLTextAreaElement: !1,
HTMLTitleElement: !1,
HTMLUListElement: !1,
HTMLVideoElement: !1,
history: !1,
Int16Array: !1,
Int32Array: !1,
Int8Array: !1,
Image: !1,
length: !1,
localStorage: !1,
location: !1,
MessageChannel: !1,
MessageEvent: !1,
MessagePort: !1,
moveBy: !1,
moveTo: !1,
MutationObserver: !1,
name: !1,
Node: !1,
NodeFilter: !1,
navigator: !1,
onbeforeunload: !0,
onblur: !0,
onerror: !0,
onfocus: !0,
onload: !0,
onresize: !0,
onunload: !0,
open: !1,
openDatabase: !1,
opener: !1,
Option: !1,
parent: !1,
print: !1,
removeEventListener: !1,
resizeBy: !1,
resizeTo: !1,
screen: !1,
scroll: !1,
scrollBy: !1,
scrollTo: !1,
sessionStorage: !1,
setInterval: !1,
setTimeout: !1,
SharedWorker: !1,
status: !1,
top: !1,
Uint16Array: !1,
Uint32Array: !1,
Uint8Array: !1,
WebSocket: !1,
window: !1,
Worker: !1,
XMLHttpRequest: !1,
XMLSerializer: !1,
XPathEvaluator: !1,
XPathException: !1,
XPathExpression: !1,
XPathNamespace: !1,
XPathNSResolver: !1,
XPathResult: !1
}, Zb = {
require: !1,
respond: !1,
getRow: !1,
emit: !1,
send: !1,
start: !1,
sum: !1,
log: !1,
exports: !1,
module: !1,
provides: !1
}, $b = {
alert: !1,
confirm: !1,
console: !1,
Debug: !1,
opera: !1,
prompt: !1
}, _b = {
dojo: !1,
dijit: !1,
dojox: !1,
define: !1,
require: !1
}, ac = ["closure", "exception", "global", "label", "outer", "unused", "var"],
bc = {
$: !1,
jQuery: !1
}, cc = {
$: !1,
$$: !1,
Asset: !1,
Browser: !1,
Chain: !1,
Class: !1,
Color: !1,
Cookie: !1,
Core: !1,
Document: !1,
DomReady: !1,
DOMEvent: !1,
DOMReady: !1,
Drag: !1,
Element: !1,
Elements: !1,
Event: !1,
Events: !1,
Fx: !1,
Group: !1,
Hash: !1,
HtmlTable: !1,
Iframe: !1,
IframeShim: !1,
InputValidator: !1,
instanceOf: !1,
Keyboard: !1,
Locale: !1,
Mask: !1,
MooTools: !1,
Native: !1,
Options: !1,
OverText: !1,
Request: !1,
Scroller: !1,
Slick: !1,
Slider: !1,
Sortables: !1,
Spinner: !1,
Swiff: !1,
Tips: !1,
Type: !1,
typeOf: !1,
URI: !1,
Window: !1
}, dc = {
__filename: !1,
__dirname: !1,
Buffer: !1,
console: !1,
exports: !0,
GLOBAL: !1,
global: !1,
module: !1,
process: !1,
require: !1,
setTimeout: !1,
clearTimeout: !1,
setInterval: !1,
clearInterval: !1
}, ec = {
$: !1,
$$: !1,
$A: !1,
$F: !1,
$H: !1,
$R: !1,
$break: !1,
$continue: !1,
$w: !1,
Abstract: !1,
Ajax: !1,
Class: !1,
Enumerable: !1,
Element: !1,
Event: !1,
Field: !1,
Form: !1,
Hash: !1,
Insertion: !1,
ObjectRange: !1,
PeriodicalExecuter: !1,
Position: !1,
Prototype: !1,
Selector: !1,
Template: !1,
Toggle: !1,
Try: !1,
Autocompleter: !1,
Builder: !1,
Control: !1,
Draggable: !1,
Draggables: !1,
Droppables: !1,
Effect: !1,
Sortable: !1,
SortableObserver: !1,
Sound: !1,
Scriptaculous: !1
}, fc = {
defineClass: !1,
deserialize: !1,
gc: !1,
help: !1,
importPackage: !1,
java: !1,
load: !1,
loadClass: !1,
print: !1,
quit: !1,
readFile: !1,
readUrl: !1,
runCommand: !1,
seal: !1,
serialize: !1,
spawn: !1,
sync: !1,
toint32: !1,
version: !1
}, gc = {
Array: !1,
Boolean: !1,
Date: !1,
decodeURI: !1,
decodeURIComponent: !1,
encodeURI: !1,
encodeURIComponent: !1,
Error: !1,
eval: !1,
EvalError: !1,
Function: !1,
hasOwnProperty: !1,
isFinite: !1,
isNaN: !1,
JSON: !1,
Map: !1,
Math: !1,
Number: !1,
Object: !1,
parseInt: !1,
parseFloat: !1,
RangeError: !1,
ReferenceError: !1,
RegExp: !1,
Set: !1,
String: !1,
SyntaxError: !1,
TypeError: !1,
URIError: !1,
WeakMap: !1
}, hc = {
escape: !1,
unescape: !1
}, ic = {}, jc = {
importScripts: !0,
postMessage: !0,
self: !0
}, kc = {
ActiveXObject: !0,
Enumerator: !0,
GetObject: !0,
ScriptEngine: !0,
ScriptEngineBuildVersion: !0,
ScriptEngineMajorVersion: !0,
ScriptEngineMinorVersion: !0,
VBArray: !0,
WSH: !0,
WScript: !0,
XDomainRequest: !0
};
! function () {
Kb = /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i, Lb = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/, Mb = /^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jshint|jslint|members?|global)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/, Nb = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/, Ob = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, Pb = /\*\//, Qb = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/, Rb = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i, Sb = /^\s*\/\*\s*falls\sthrough\s*\*\/\s*$/
}(), "function" != typeof Array.isArray && (Array.isArray = function (a) {
return "[object Array]" === Object.prototype.toString.apply(a)
}), Array.prototype.forEach || (Array.prototype.forEach = function (a, b) {
for (var c = this.length, d = 0; c > d; d++) a.call(b || this, this[d], d, this)
}), Array.prototype.indexOf || (Array.prototype.indexOf = function (a) {
if (null === this || void 0 === this) throw new TypeError;
var b = new Object(this),
c = b.length >>> 0;
if (0 === c) return -1;
var d = 0;
if (arguments.length > 0 && (d = Number(arguments[1]), d != d ? d = 0 : 0 !== d && 1 / 0 != d && d != -1 / 0 && (d = (d > 0 || -1) * Math.floor(Math.abs(d)))), d >= c) return -1;
for (var e = d >= 0 ? d : Math.max(c - Math.abs(d), 0); c > e; e++)
if (e in b && b[e] === a) return e;
return -1
}), "function" != typeof Object.create && (Object.create = function (b) {
return a.prototype = b, new a
}), "function" != typeof Object.keys && (Object.keys = function (a) {
var c, d = [];
for (c in a) b(a, c) && d.push(c);
return d
});
var lc = function () {
function a() {
var a, b;
return h >= qb.length ? !1 : (d = 1, i = qb[h], h += 1, a = wb.smarttabs ? i.search(/ \t/) : i.search(/ \t|\t [^\*]/), a >= 0 && n("Mixed spaces and tabs.", h, a + 1), i = i.replace(/\t/g, Eb), a = i.search(Lb), a >= 0 && n("Unsafe character.", h, a), wb.maxlen && wb.maxlen < i.length && n("Line too long.", h, i.length), b = wb.trailing && i.match(/^(.*?)\s+$/), b && !/^\s+$/.test(i) && n("Trailing whitespace.", h, b[1].length + 1), !0)
}

function c(a, c) {
function e(a) {
if (!wb.proto && "__proto__" === a) return n("The '{a}' property is deprecated.", h, g, a), void 0;
if (!wb.iterator && "__iterator__" === a) return n("'{a}' is only available in JavaScript 1.7.", h, g, a), void 0;
var b = /^(_+.*|.*_+)$/.test(a);
if (wb.nomen && b && "_" !== a) {
if (wb.node && "." !== Fb.id && /^(__dirname|__filename)$/.test(a)) return;
return n("Unexpected {a} in '{b}'.", h, g, "dangling '_'", a), void 0
}
wb.camelcase && a.replace(/^_+/, "").indexOf("_") > -1 && !a.match(/^[A-Z0-9_]*$/) && n("Identifier '{a}' is not in camel case.", h, g, c)
}
var f, i;
return i = "(color)" === a || "(range)" === a ? {
type: a
} : "(punctuator)" === a || "(identifier)" === a && b(ic, c) ? ic[c] || ic["(error)"] : ic[a], i = Object.create(i), ("(string)" === a || "(range)" === a) && !wb.scripturl && Rb.test(c) && n("Script URL.", h, g), "(identifier)" === a && (i.identifier = !0, e(c)), i.value = c, i.line = h, i.character = d, i.from = g, f = i.id, "(endline)" !== f && (yb = f && ("(,=:[!&|?{};".indexOf(f.charAt(f.length - 1)) >= 0 || "return" === f || "case" === f)), i
}
var d, g, h, i;
return {
init: function (b) {
qb = "string" == typeof b ? b.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n") : b, qb[0] && "#!" === qb[0].substr(0, 2) && (qb[0] = ""), h = 0, a(), g = 1
},
range: function (a, b) {
var e, f = "";
for (g = d, i.charAt(0) !== a && p("Expected '{a}' and instead saw '{b}'.", h, d, a, i.charAt(0));;) {
switch (i = i.slice(1), d += 1, e = i.charAt(0)) {
case "":
p("Missing '{a}'.", h, d, e);
break;
case b:
return i = i.slice(1), d += 1, c("(range)", f);
case "\\":
n("Unexpected '{a}'.", h, d, e)
}
f += e
}
},
token: function () {
function b(a) {
var b, c = a.exec(i);
return c ? (u = c[0].length, b = c[1], m = b.charAt(0), i = i.substr(u), g = d + u - b.length, d += u, b) : void 0
}

function j(b) {
function e(a) {
var b = parseInt(i.substr(j + 1, a), 16);
j += a, b >= 32 && 126 >= b && 34 !== b && 92 !== b && 39 !== b && n("Unnecessary escapement.", h, d), d += a, f = String.fromCharCode(b)
}
var f, j, k = "",
l = !1;
pb && '"' !== b && n("Strings must use doublequote.", h, d), wb.quotmark && ("single" === wb.quotmark && "'" !== b ? n("Strings must use singlequote.", h, d) : "double" === wb.quotmark && '"' !== b ? n("Strings must use doublequote.", h, d) : wb.quotmark === !0 && (Ab = Ab || b, Ab !== b && n("Mixed double and single quotes.", h, d))), j = 0;
a: for (;;) {
for (; j >= i.length;) {
j = 0;
var m = h,
o = g;
if (!a()) {
p("Unclosed string.", m, o);
break a
}
l ? l = !1 : n("Unclosed string.", m, o)
}
if (f = i.charAt(j), f === b) return d += 1, i = i.substr(j + 1), c("(string)", k, b);
if (" " > f) {
if ("\n" === f || "\r" === f) break;
n("Control character in string: {a}.", h, d + j, i.slice(0, j))
} else if ("\\" === f) switch (j += 1, d += 1, f = i.charAt(j), A = i.charAt(j + 1), f) {
case "\\":
case '"':
case "/":
break;
case "'":
pb && n("Avoid \\'.", h, d);
break;
case "b":
f = "\b";
break;
case "f":
f = "\f";
break;
case "n":
f = "\n";
break;
case "r":
f = "\r";
break;
case "t":
f = "	";
break;
case "0":
f = "\0", A >= 0 && 7 >= A && Db["use strict"] && n("Octal literals are not allowed in strict mode.", h, d);
break;
case "u":
e(4);
break;
case "v":
pb && n("Avoid \\v.", h, d), f = "";
break;
case "x":
pb && n("Avoid \\x-.", h, d), e(2);
break;
case "":
if (l = !0, wb.multistr) {
pb && n("Avoid EOL escapement.", h, d), f = "", d -= 1;
break
}
n("Bad escapement of EOL. Use option multistr if needed.", h, d);
break;
default:
n("Bad escapement.", h, d)
}
k += f, d += 1, j += 1
}
}
for (var l, m, o, q, r, s, t, u, v, w, x, y, z, A;;) {
if (!i) return c(a() ? "(endline)" : "(end)", "");
if (x = b(Mb)) {
if (e(m) || "_" === m || "$" === m) return c("(identifier)", x);
if (f(m)) return isFinite(Number(x)) || n("Bad number '{a}'.", h, d, x), e(i.substr(0, 1)) && n("Missing space after '{a}'.", h, d, x), "0" === m && (q = x.substr(1, 1), f(q) ? "." !== Fb.id && n("Don't use extra leading zeros '{a}'.", h, d, x) : !pb || "x" !== q && "X" !== q || n("Avoid 0x-. '{a}'.", h, d, x)), "." === x.substr(x.length - 1) && n("A trailing decimal point can be confused with a dot '{a}'.", h, d, x), c("(number)", x);
switch (x) {
case '"':
case "'":
return j(x);
case "//":
i = "", Fb.comment = !0;
break;
case "/*":
for (; t = i.search(Pb), !(t >= 0);) a() || p("Unclosed comment.", h, d);
i = i.substr(t + 2), Fb.comment = !0;
break;
case "/*members":
case "/*member":
case "/*jshint":
case "/*jslint":
case "/*global":
case "*/":
return {
value: x,
type: "special",
line: h,
character: d,
from: g
};
case "":
break;
case "/":
if ("/=" === Fb.id && p("A regular expression literal can be confused with '/='.", h, g), yb) {
for (r = 0, o = 0, u = 0;;) {
switch (l = !0, m = i.charAt(u), u += 1, m) {
case "":
return p("Unclosed regular expression.", h, g), k("Stopping.", h, g);
case "/":
for (r > 0 && n("{a} unterminated regular expression group(s).", h, g + u, r), m = i.substr(0, u - 1), w = {
g: !0,
i: !0,
m: !0
}; w[i.charAt(u)] === !0;) w[i.charAt(u)] = !1, u += 1;
return d += u, i = i.substr(u), w = i.charAt(0), ("/" === w || "*" === w) && p("Confusing regular expression.", h, g), c("(regexp)", m);
case "\\":
m = i.charAt(u), " " > m ? n("Unexpected control character in regular expression.", h, g + u) : "<" === m && n("Unexpected escaped character '{a}' in regular expression.", h, g + u, m), u += 1;
break;
case "(":
if (r += 1, l = !1, "?" === i.charAt(u)) switch (u += 1, i.charAt(u)) {
case ":":
case "=":
case "!":
u += 1;
break;
default:
n("Expected '{a}' and instead saw '{b}'.", h, g + u, ":", i.charAt(u))
} else o += 1;
break;
case "|":
l = !1;
break;
case ")":
0 === r ? n("Unescaped '{a}'.", h, g + u, ")") : r -= 1;
break;
case " ":
for (w = 1;
" " === i.charAt(u);) u += 1, w += 1;
w > 1 && n("Spaces are hard to count. Use {{a}}.", h, g + u, w);
break;
case "[":
m = i.charAt(u), "^" === m && (u += 1, wb.regexp ? n("Insecure '{a}'.", h, g + u, m) : "]" === i.charAt(u) && p("Unescaped '{a}'.", h, g + u, "^")), "]" === m && n("Empty class.", h, g + u - 1), y = !1, z = !1;
a: do switch (m = i.charAt(u), u += 1, m) {
case "[":
case "^":
n("Unescaped '{a}'.", h, g + u, m), z ? z = !1 : y = !0;
break;
case "-":
y && !z ? (y = !1, z = !0) : z ? z = !1 : "]" === i.charAt(u) ? z = !0 : (wb.regexdash !== (2 === u || 3 === u && "^" === i.charAt(1)) && n("Unescaped '{a}'.", h, g + u - 1, "-"), y = !0);
break;
case "]":
z && !wb.regexdash && n("Unescaped '{a}'.", h, g + u - 1, "-");
break a;
case "\\":
m = i.charAt(u), " " > m ? n("Unexpected control character in regular expression.", h, g + u) : "<" === m && n("Unexpected escaped character '{a}' in regular expression.", h, g + u, m), u += 1, /[wsd]/i.test(m) ? (z && (n("Unescaped '{a}'.", h, g + u, "-"), z = !1), y = !1) : z ? z = !1 : y = !0;
break;
case "/":
n("Unescaped '{a}'.", h, g + u - 1, "/"), z ? z = !1 : y = !0;
break;
case "<":
z ? z = !1 : y = !0;
break;
default:
z ? z = !1 : y = !0
}
while (m);
break;
case ".":
wb.regexp && n("Insecure '{a}'.", h, g + u, m);
break;
case "]":
case "?":
case "{":
case "}":
case "+":
case "*":
n("Unescaped '{a}'.", h, g + u, m)
}
if (l) switch (i.charAt(u)) {
case "?":
case "+":
case "*":
u += 1, "?" === i.charAt(u) && (u += 1);
break;
case "{":
for (u += 1, m = i.charAt(u), ("0" > m || m > "9") && n("Expected a number and instead saw '{a}'.", h, g + u, m), u += 1, v = +m; m = i.charAt(u), !("0" > m || m > "9");) u += 1, v = +m + 10 * v;
if (s = v, "," === m && (u += 1, s = 1 / 0, m = i.charAt(u), m >= "0" && "9" >= m))
for (u += 1, s = +m; m = i.charAt(u), !("0" > m || m > "9");) u += 1, s = +m + 10 * s;
"}" !== i.charAt(u) ? n("Expected '{a}' and instead saw '{b}'.", h, g + u, "}", m) : u += 1, "?" === i.charAt(u) && (u += 1), v > s && n("'{a}' should not be greater than '{b}'.", h, g + u, v, s)
}
}
return m = i.substr(0, u - 1), d += u, i = i.substr(u), c("(regexp)", m)
}
return c("(punctuator)", x);
case "#":
return c("(punctuator)", x);
default:
return c("(punctuator)", x)
}
} else {
for (x = "", m = ""; i && "!" > i;) i = i.substr(1);
i && (p("Unexpected '{a}'.", h, d, i.substr(0, 1)), i = "")
}
}
}
}
}();
K("(number)", function () {
return this
}), K("(string)", function () {
return this
}), ic["(identifier)"] = {
type: "(identifier)",
lbp: 0,
identifier: !0,
nud: function () {
var a, b = this.value,
c = Bb[b];
if ("function" == typeof c ? c = void 0 : "boolean" == typeof c && (a = jb, jb = kb[0], r(b, "var"), c = jb, jb = a), jb === c) switch (jb[b]) {
case "unused":
jb[b] = "var";
break;
case "unction":
jb[b] = "function", this["function"] = !0;
break;
case "function":
this["function"] = !0;
break;
case "label":
m("'{a}' is a statement label.", Fb, b)
} else if (jb["(global)"]) wb.undef && "boolean" != typeof xb[b] && ("typeof" !== hb && "delete" !== hb || ub && ("." === ub.value || "[" === ub.value)) && l(jb, "'{a}' is not defined.", Fb, b), ab(Fb);
else switch (jb[b]) {
case "closure":
case "function":
case "var":
case "unused":
m("'{a}' used out of scope.", Fb, b);
break;
case "label":
m("'{a}' is a statement label.", Fb, b);
break;
case "outer":
case "global":
break;
default:
if (c === !0) jb[b] = !0;
else if (null === c) m("'{a}' is not allowed.", Fb, b), ab(Fb);
else if ("object" != typeof c) wb.undef && ("typeof" !== hb && "delete" !== hb || ub && ("." === ub.value || "[" === ub.value)) && l(jb, "'{a}' is not defined.", Fb, b), jb[b] = !0, ab(Fb);
else switch (c[b]) {
case "function":
case "unction":
this["function"] = !0, c[b] = "closure", jb[b] = c["(global)"] ? "global" : "outer";
break;
case "var":
case "unused":
c[b] = "closure", jb[b] = c["(global)"] ? "global" : "outer";
break;
case "closure":
jb[b] = c["(global)"] ? "global" : "outer";
break;
case "label":
m("'{a}' is a statement label.", Fb, b)
}
}
return this
},
led: function () {
o("Expected an operator and instead saw '{a}'.", ub, ub.value)
}
}, K("(regexp)", function () {
return this
}), F("(endline)"), F("(begin)"), F("(end)").reach = !0, F("</").reach = !0, F("<!"), F("<!--"), F("-->"), F("(error)").reach = !0, F("}").reach = !0, F(")"), F("]"), F('"').reach = !0, F("'").reach = !0, F(";"), F(":").reach = !0, F(","), F("#"), F("@"), L("else"), L("case").reach = !0, L("catch"), L("default").reach = !0, L("finally"), M("arguments", function (a) {
Db["use strict"] && jb["(global)"] && m("Strict violation.", a)
}), M("eval"), M("false"), M("Infinity"), M("NaN"), M("null"), M("this", function (a) {
Db["use strict"] && !wb.validthis && (jb["(statement)"] && jb["(name)"].charAt(0) > "Z" || jb["(global)"]) && m("Possible strict violation.", a)
}), M("true"), M("undefined"), Q("=", "assign", 20), Q("+=", "assignadd", 20), Q("-=", "assignsub", 20), Q("*=", "assignmult", 20), Q("/=", "assigndiv", 20).nud = function () {
o("A regular expression literal can be confused with '/='.")
}, Q("%=", "assignmod", 20), S("&=", "assignbitand", 20), S("|=", "assignbitor", 20), S("^=", "assignbitxor", 20), S("<<=", "assignshiftleft", 20), S(">>=", "assignshiftright", 20), S(">>>=", "assignshiftrightunsigned", 20), N("?", function (a, b) {
return b.left = a, b.right = v(10), u(":"), b["else"] = v(10), b
}, 30), N("||", "or", 40), N("&&", "and", 50), R("|", "bitor", 70), R("^", "bitxor", 80), R("&", "bitand", 90), O("==", function (a, b) {
var c = wb.eqnull && ("null" === a.value || "null" === b.value);
return !c && wb.eqeqeq ? m("Expected '{a}' and instead saw '{b}'.", this, "===", "==") : P(a) ? m("Use '{a}' to compare with '{b}'.", this, "===", a.value) : P(b) && m("Use '{a}' to compare with '{b}'.", this, "===", b.value), this
}), O("==="), O("!=", function (a, b) {
var c = wb.eqnull && ("null" === a.value || "null" === b.value);
return !c && wb.eqeqeq ? m("Expected '{a}' and instead saw '{b}'.", this, "!==", "!=") : P(a) ? m("Use '{a}' to compare with '{b}'.", this, "!==", a.value) : P(b) && m("Use '{a}' to compare with '{b}'.", this, "!==", b.value), this
}), O("!=="), O("<"), O(">"), O("<="), O(">="), R("<<", "shiftleft", 120), R(">>", "shiftright", 120), R(">>>", "shiftrightunsigned", 120), N("in", "in", 120), N("instanceof", "instanceof", 120), N("+", function (a, b) {
var c = v(130);
return a && c && "(string)" === a.id && "(string)" === c.id ? (a.value += c.value, a.character = c.character, !wb.scripturl && Rb.test(a.value) && m("JavaScript URL.", a), a) : (b.left = a, b.right = c, b)
}, 130), J("+", "num"), J("+++", function () {
return m("Confusing pluses."), this.right = v(150), this.arity = "unary", this
}), N("+++", function (a) {
return m("Confusing pluses."), this.left = a, this.right = v(130), this
}, 130), N("-", "sub", 130), J("-", "neg"), J("---", function () {
return m("Confusing minuses."), this.right = v(150), this.arity = "unary", this
}), N("---", function (a) {
return m("Confusing minuses."), this.left = a, this.right = v(130), this
}, 130), N("*", "mult", 140), N("/", "div", 140), N("%", "mod", 140), T("++", "postinc"), J("++", "preinc"), ic["++"].exps = !0, T("--", "postdec"), J("--", "predec"), ic["--"].exps = !0, J("delete", function () {
var a = v(0);
return (!a || "." !== a.id && "[" !== a.id) && m("Variables should not be deleted."), this.first = a, this
}).exps = !0, J("~", function () {
return wb.bitwise && m("Unexpected '{a}'.", this, "~"), v(150), this
}), J("!", function () {
return this.right = v(150), this.arity = "unary", Tb[this.right.id] === !0 && m("Confusing use of '{a}'.", this, "!"), this
}), J("typeof", "typeof"), J("new", function () {
var a, c = v(155);
if (c && "function" !== c.id)
if (c.identifier) switch (c["new"] = !0, c.value) {
case "Number":
case "String":
case "Boolean":
case "Math":
case "JSON":
m("Do not use {a} as a constructor.", zb, c.value);
break;
case "Function":
wb.evil || m("The Function constructor is eval.");
break;
case "Date":
case "RegExp":
break;
default:
"function" !== c.id && (a = c.value.substr(0, 1), wb.newcap && ("A" > a || a > "Z") && !b(lb, c.value) && m("A constructor name should start with an uppercase letter.", Fb))
} else "." !== c.id && "[" !== c.id && "(" !== c.id && m("Bad constructor.", Fb);
else wb.supernew || m("Weird construction. Delete 'new'.", this);
return w(Fb, ub), "(" === ub.id || wb.supernew || m("Missing '()' invoking a constructor.", Fb, Fb.value), this.first = c, this
}), ic["new"].exps = !0, J("void").exps = !0, N(".", function (a, b) {
w(zb, Fb), x();
var c = V();
return "string" == typeof c && _(c), b.left = a, b.right = c, !a || "arguments" !== a.value || "callee" !== c && "caller" !== c ? wb.evil || !a || "document" !== a.value || "write" !== c && "writeln" !== c || m("document.write can be a form of eval.", a) : wb.noarg ? m("Avoid arguments.{a}.", a, c) : Db["use strict"] && o("Strict violation."), wb.evil || "eval" !== c && "execScript" !== c || m("eval is evil."), b
}, 160, !0), N("(", function (a, b) {
"}" !== zb.id && ")" !== zb.id && x(zb, Fb), y(), wb.immed && !a.immed && "function" === a.id && m("Wrap an immediate function invocation in parentheses to assist the reader in understanding that the expression is the result of a function, and not the function itself.");
var c = 0,
d = [];
if (a && "(identifier)" === a.type && a.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/) && "Number" !== a.value && "String" !== a.value && "Boolean" !== a.value && "Date" !== a.value && ("Math" === a.value ? m("Math is not a function.", a) : wb.newcap && m("Missing 'new' prefix when invoking a constructor.", a)), ")" !== ub.id)
for (; d[d.length] = v(10), c += 1, "," === ub.id;) D();
return u(")"), y(zb, Fb), "object" == typeof a && ("parseInt" === a.value && 1 === c && m("Missing radix parameter.", Fb), wb.evil || ("eval" === a.value || "Function" === a.value || "execScript" === a.value ? (m("eval is evil.", a), d[0] && "(string)" === [0].id && q(a, d[0].value)) : !d[0] || "(string)" !== d[0].id || "setTimeout" !== a.value && "setInterval" !== a.value ? !d[0] || "(string)" !== d[0].id || "." !== a.value || "window" !== a.left.value || "setTimeout" !== a.right && "setInterval" !== a.right || (m("Implied eval is evil. Pass a function instead of a string.", a), q(a, d[0].value)) : (m("Implied eval is evil. Pass a function instead of a string.", a), q(a, d[0].value))), a.identifier || "." === a.id || "[" === a.id || "(" === a.id || "&&" === a.id || "||" === a.id || "?" === a.id || m("Bad invocation.", a)), b.left = a, b
}, 155, !0).exps = !0, J("(", function () {
y(), "function" === ub.id && (ub.immed = !0);
var a = v(0);
return u(")", this), y(zb, Fb), wb.immed && "function" === a.id && "(" !== ub.id && ("." !== ub.id || "call" !== t().value && "apply" !== t().value) && m("Do not wrap function literals in parens unless they are to be immediately invoked.", this), a
}), N("[", function (a, b) {
x(zb, Fb), y();
var c, d = v(0);
return d && "(string)" === d.type && (wb.evil || "eval" !== d.value && "execScript" !== d.value || m("eval is evil.", b), _(d.value), !wb.sub && Qb.test(d.value) && (c = ic[d.value], c && c.reserved || m("['{a}'] is better written in dot notation.", zb, d.value))), u("]", b), y(zb, Fb), b.left = a, b.right = d, b
}, 160, !0), J("[", function () {
var a = Fb.line !== ub.line;
for (this.first = [], a && (ob += wb.indent, ub.from === ob + wb.indent && (ob += wb.indent));
"(end)" !== ub.id;) {
for (;
"," === ub.id;) m("Extra comma."), u(",");
if ("]" === ub.id) break;
if (a && Fb.line !== ub.line && B(), this.first.push(v(10)), "," !== ub.id) break;
if (D(), "]" === ub.id && !wb.es5) {
m("Extra comma.", Fb);
break
}
}
return a && (ob -= wb.indent, B()), u("]", this), this
}, 160),
function (a) {
a.nud = function () {
function a(a, c) {
j[a] && b(j, a) ? m("Duplicate member '{a}'.", ub, g) : j[a] = {}, j[a].basic = !0, j[a].basicToken = c
}

function c(a, c) {
j[a] && b(j, a) ? (j[a].basic || j[a].setter) && m("Duplicate member '{a}'.", ub, g) : j[a] = {}, j[a].setter = !0, j[a].setterToken = c
}

function d(a) {
j[a] && b(j, a) ? (j[a].basic || j[a].getter) && m("Duplicate member '{a}'.", ub, g) : j[a] = {}, j[a].getter = !0, j[a].getterToken = Fb
}
var e, f, g, h, i, j = {};
for (e = Fb.line !== ub.line, e && (ob += wb.indent, ub.from === ob + wb.indent && (ob += wb.indent));
"}" !== ub.id;) {
if (e && B(), "get" === ub.value && ":" !== t().id) u("get"), wb.es5 || o("get/set are ES5 features."), g = bb(), g || o("Missing property name."), d(g), i = ub, w(Fb, ub), f = db(), h = f["(params)"], h && m("Unexpected parameter '{a}' in get {b} function.", i, h[0], g), w(Fb, ub);
else if ("set" === ub.value && ":" !== t().id) u("set"), wb.es5 || o("get/set are ES5 features."), g = bb(), g || o("Missing property name."), c(g, ub), i = ub, w(Fb, ub), f = db(), h = f["(params)"], h && 1 === h.length || m("Expected a single parameter in set {a} function.", i, g);
else {
if (g = bb(), a(g, ub), "string" != typeof g) break;
u(":"), z(Fb, ub), v(10)
} if (_(g), "," !== ub.id) break;
D(), "," === ub.id ? m("Extra comma.", Fb) : "}" !== ub.id || wb.es5 || m("Extra comma.", Fb)
}
if (e && (ob -= wb.indent, B()), u("}", this), wb.es5)
for (var k in j) b(j, k) && j[k].setter && !j[k].getter && m("Setter is defined without getter.", j[k].setterToken);
return this
}, a.fud = function () {
o("Expected to see a statement and instead saw a block.", Fb)
}
}(F("{")), Ib = function () {
var a = G("const", function (a) {
var b, c, d;
for (this.first = [];
(z(Fb, ub), b = V(), "const" === jb[b] && m("const '" + b + "' has already been declared"), jb["(global)"] && xb[b] === !1 && m("Redefinition of '{a}'.", Fb, b), r(b, "const"), !a) && (c = Fb, this.first.push(Fb), "=" !== ub.id && m("const '{a}' is initialized to 'undefined'.", Fb, b), "=" === ub.id && (z(Fb, ub), u("="), z(Fb, ub), "undefined" === ub.id && m("It is not necessary to initialize '{a}' to 'undefined'.", Fb, b), "=" === t(0).id && ub.identifier && o("Constant {a} was not declared correctly.", ub, ub.value), d = v(0), c.first = d), "," === ub.id);) D();
return this
});
a.exps = !0
};
var mc = G("var", function (a) {
var b, c, d;
for (jb["(onevar)"] && wb.onevar ? m("Too many var statements.") : jb["(global)"] || (jb["(onevar)"] = !0), this.first = [];
(z(Fb, ub), b = V(), wb.esnext && "const" === jb[b] && m("const '" + b + "' has already been declared"), jb["(global)"] && xb[b] === !1 && m("Redefinition of '{a}'.", Fb, b), r(b, "unused", Fb), !a) && (c = Fb, this.first.push(Fb), "=" === ub.id && (z(Fb, ub), u("="), z(Fb, ub), "undefined" === ub.id && m("It is not necessary to initialize '{a}' to 'undefined'.", Fb, b), "=" === t(0).id && ub.identifier && o("Variable {a} was not declared correctly.", ub, ub.value), d = v(0), c.first = d), "," === ub.id);) D();
return this
});
mc.exps = !0, H("function", function () {
nb && m("Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.", Fb);
var a = V();
return wb.esnext && "const" === jb[a] && m("const '" + a + "' has already been declared"), w(Fb, ub), r(a, "unction", Fb), db(a, !0), "(" === ub.id && ub.line === Fb.line && o("Function declarations are not invocable. Wrap the whole function invocation in parens."), this
}), J("function", function () {
var a = U();
return a ? w(Fb, ub) : z(Fb, ub), db(a), !wb.loopfunc && jb["(loopage)"] && m("Don't make functions within a loop."), this
}), H("if", function () {
var a = ub;
return fb(), u("("), z(this, a), y(), v(20), "=" === ub.id && (wb.boss || m("Expected a conditional expression and instead saw an assignment."), u("="), v(20)), u(")", a), y(zb, Fb), $(!0, !0), "else" === ub.id && (z(Fb, ub), u("else"), "if" === ub.id || "switch" === ub.id ? X(!0) : $(!0, !0)), this
}), H("try", function () {
var a, b, c;
return $(!1), "catch" === ub.id && (fb(), u("catch"), z(Fb, ub), u("("), c = Bb, Bb = Object.create(c), b = ub.value, "(identifier)" !== ub.type ? m("Expected an identifier and instead saw '{a}'.", ub, b) : r(b, "exception"), u(), u(")"), $(!1), a = !0, Bb = c), "finally" === ub.id ? (u("finally"), $(!1), void 0) : (a || o("Expected '{a}' and instead saw '{b}'.", ub, "catch", ub.value), this)
}), H("while", function () {
var a = ub;
return jb["(breakage)"] += 1, jb["(loopage)"] += 1, fb(), u("("), z(this, a), y(), v(20), "=" === ub.id && (wb.boss || m("Expected a conditional expression and instead saw an assignment."), u("="), v(20)), u(")", a), y(zb, Fb), $(!0, !0), jb["(breakage)"] -= 1, jb["(loopage)"] -= 1, this
}).labelled = !0, H("with", function () {
var a = ub;
return Db["use strict"] ? o("'with' is not allowed in strict mode.", Fb) : wb.withstmt || m("Don't use 'with'.", Fb), u("("), z(this, a), y(), v(0), u(")", a), y(zb, Fb), $(!0, !0), this
}), H("switch", function () {
var a = ub,
b = !1;
for (jb["(breakage)"] += 1, u("("), z(this, a), y(), this.condition = v(20), u(")", a), y(zb, Fb), z(Fb, ub), a = ub, u("{"), z(Fb, ub), ob += wb.indent, this.cases = [];;) switch (ub.id) {
case "case":
switch (jb["(verb)"]) {
case "break":
case "case":
case "continue":
case "return":
case "switch":
case "throw":
break;
default:
Sb.test(qb[ub.line - 2]) || m("Expected a 'break' statement before 'case'.", Fb)
}
B(-wb.indent), u("case"), this.cases.push(v(20)), fb(), b = !0, u(":"), jb["(verb)"] = "case";
break;
case "default":
switch (jb["(verb)"]) {
case "break":
case "continue":
case "return":
case "throw":
break;
default:
Sb.test(qb[ub.line - 2]) || m("Expected a 'break' statement before 'default'.", Fb)
}
B(-wb.indent), u("default"), b = !0, u(":");
break;
case "}":
return ob -= wb.indent, B(), u("}", a), (1 === this.cases.length || "true" === this.condition.id || "false" === this.condition.id) && (wb.onecase || m("This 'switch' should be an 'if'.", this)), jb["(breakage)"] -= 1, jb["(verb)"] = void 0, void 0;
case "(end)":
return o("Missing '{a}'.", ub, "}"), void 0;
default:
if (b) switch (Fb.id) {
case ",":
return o("Each value should have its own case label."), void 0;
case ":":
b = !1, Y();
break;
default:
return o("Missing ':' on a case clause.", Fb), void 0
} else {
if (":" !== Fb.id) return o("Expected '{a}' and instead saw '{b}'.", ub, "case", ub.value), void 0;
u(":"), o("Unexpected '{a}'.", Fb, ":"), Y()
}
}
}).labelled = !0, G("debugger", function () {
return wb.debug || m("All 'debugger' statements should be removed."), this
}).exps = !0,
function () {
var a = G("do", function () {
jb["(breakage)"] += 1, jb["(loopage)"] += 1, fb(), this.first = $(!0), u("while");
var a = ub;
return z(Fb, a), u("("), y(), v(20), "=" === ub.id && (wb.boss || m("Expected a conditional expression and instead saw an assignment."), u("="), v(20)), u(")", a), y(zb, Fb), jb["(breakage)"] -= 1, jb["(loopage)"] -= 1, this
});
a.labelled = !0, a.exps = !0
}(), H("for", function () {
var a, b = ub;
if (jb["(breakage)"] += 1, jb["(loopage)"] += 1, fb(), u("("), z(this, b), y(), "in" === t("var" === ub.id ? 1 : 0).id) {
if ("var" === ub.id) u("var"), mc.fud.call(mc, !0);
else {
switch (jb[ub.value]) {
case "unused":
jb[ub.value] = "var";
break;
case "var":
break;
default:
m("Bad for in variable '{a}'.", ub, ub.value)
}
u()
}
return u("in"), v(20), u(")", b), a = $(!0, !0), wb.forin && a && (a.length > 1 || "object" != typeof a[0] || "if" !== a[0].value) && m("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.", this), jb["(breakage)"] -= 1, jb["(loopage)"] -= 1, this
}
if (";" !== ub.id)
if ("var" === ub.id) u("var"), mc.fud.call(mc);
else
for (; v(0, "for"), "," === ub.id;) D();
if (C(Fb), u(";"), ";" !== ub.id && (v(20), "=" === ub.id && (wb.boss || m("Expected a conditional expression and instead saw an assignment."), u("="), v(20))), C(Fb), u(";"), ";" === ub.id && o("Expected '{a}' and instead saw '{b}'.", ub, ")", ";"), ")" !== ub.id)
for (; v(0, "for"), "," === ub.id;) D();
return u(")", b), y(zb, Fb), $(!0, !0), jb["(breakage)"] -= 1, jb["(loopage)"] -= 1, this
}).labelled = !0, G("break", function () {
var a = ub.value;
return 0 === jb["(breakage)"] && m("Unexpected '{a}'.", ub, this.value), wb.asi || C(this), ";" !== ub.id && Fb.line === ub.line && ("label" !== jb[a] ? m("'{a}' is not a statement label.", ub, a) : Bb[a] !== jb && m("'{a}' is out of scope.", ub, a), this.first = ub, u()), W("break"), this
}).exps = !0, G("continue", function () {
var a = ub.value;
return 0 === jb["(breakage)"] && m("Unexpected '{a}'.", ub, this.value), wb.asi || C(this), ";" !== ub.id ? Fb.line === ub.line && ("label" !== jb[a] ? m("'{a}' is not a statement label.", ub, a) : Bb[a] !== jb && m("'{a}' is out of scope.", ub, a), this.first = ub, u()) : jb["(loopage)"] || m("Unexpected '{a}'.", ub, this.value), W("continue"), this
}).exps = !0, G("return", function () {
return this.line === ub.line ? ("(regexp)" === ub.id && m("Wrap the /regexp/ literal in parens to disambiguate the slash operator."), ";" === ub.id || ub.reach || (z(Fb, ub), "=" !== t().value || wb.boss || n("Did you mean to return a conditional instead of an assignment?", Fb.line, Fb.character + 1), this.first = v(0))) : wb.asi || C(this), W("return"), this
}).exps = !0, G("throw", function () {
return C(this), z(Fb, ub), this.first = v(20), W("throw"), this
}).exps = !0, L("class"), L("const"), L("enum"), L("export"), L("extends"), L("import"), L("super"), L("let"), L("yield"), L("implements"), L("interface"), L("package"), L("private"), L("protected"), L("public"), L("static");
var nc = function (a, e, f) {
var g, i, k, l, o, q = {};
if (e && e.scope ? JSHINT.scope = e.scope : (JSHINT.errors = [], JSHINT.undefs = [], JSHINT.internals = [], JSHINT.blacklist = {}, JSHINT.scope = "(main)"), xb = Object.create(gc), ib = Object.create(null), h(xb, f || {}), e)
for (g = e.predef, g && (Array.isArray(g) || "object" != typeof g || (g = Object.keys(g)), g.forEach(function (a) {
var b;
"-" === a[0] ? (b = a.slice(1), JSHINT.blacklist[b] = b) : xb[a] = !0
})), o = Object.keys(e), l = 0; l < o.length; l++) q[o[l]] = e[o[l]], "newcap" === o[l] && e[o[l]] === !1 && (q["(explicitNewcap)"] = !0);
for (wb = q, wb.indent = wb.indent || 4, wb.maxerr = wb.maxerr || 50, Eb = "", i = 0; i < wb.indent; i += 1) Eb += " ";
if (ob = 1, lb = Object.create(xb), Bb = lb, jb = {
"(global)": !0,
"(name)": "(global)",
"(scope)": Bb,
"(breakage)": 0,
"(loopage)": 0,
"(tokens)": {},
"(metrics)": eb(ub)
}, kb = [jb], Hb = [], Cb = null, sb = {}, tb = null, mb = {}, nb = !1, rb = [], pb = !1, Jb = 0, qb = [], Gb = [], !d(a) && !Array.isArray(a)) return p("Input is neither a string nor an array of strings.", 0), !1;
if (d(a) && /^\s*$/g.test(a)) return p("Input is an empty string.", 0), !1;
if (0 === a.length) return p("Input is an empty array.", 0), !1;
lc.init(a), yb = !0, Db = {}, zb = Fb = ub = ic["(begin)"];
for (var r in e) b(e, r) && c(r, Fb);
j(), h(xb, f || {}), D.first = !0, Ab = void 0;
try {
switch (u(), ub.id) {
case "{":
case "[":
wb.laxbreak = !0, pb = !0, gb();
break;
default:
Z(), Db["use strict"] && !wb.globalstrict && m('Use the function form of "use strict".', zb), Y()
}
u(ub && "." !== ub.value ? "(end)" : void 0);
var s = function (a, b) {
do {
if ("string" == typeof b[a]) return "unused" === b[a] ? b[a] = "var" : "unction" === b[a] && (b[a] = "closure"), !0;
b = b["(context)"]
} while (b);
return !1
}, t = function (a, b) {
if (mb[a]) {
for (var c = [], d = 0; d < mb[a].length; d += 1) mb[a][d] !== b && c.push(mb[a][d]);
0 === c.length ? delete mb[a] : mb[a] = c
}
}, v = function (a, b) {
var c = b.line,
d = b.character;
wb.unused && n("'{a}' is defined but never used.", c, d, a), Gb.push({
name: a,
line: c,
character: d
})
}, w = function (a, b) {
var c = a[b],
d = a["(tokens)"][b];
"(" !== b.charAt(0) && ("unused" === c || "unction" === c) && (a["(params)"] && -1 !== a["(params)"].indexOf(b) || v(b, d))
};
for (i = 0; i < JSHINT.undefs.length; i += 1) k = JSHINT.undefs[i].slice(0), s(k[2].value, k[0]) ? t(k[2].value, k[2].line) : m.apply(m, k.slice(1));
kb.forEach(function (a) {
for (var c in a) b(a, c) && w(a, c);
if (a["(params)"])
for (var d, e = a["(params)"].slice(), f = e.pop(); f;) {
if (d = a[f], "undefined" === f) return;
if ("unused" !== d && "unction" !== d) return;
v(f, a["(tokens)"][f]), f = e.pop()
}
});
for (var x in ib) b(ib, x) && !b(lb, x) && v(x, ib[x])
} catch (y) {
if (y) {
var z = ub || {};
JSHINT.errors.push({
raw: y.raw,
reason: y.message,
line: y.line || z.line,
character: y.character || z.from
}, null)
}
}
if ("(main)" === JSHINT.scope)
for (e = e || {}, i = 0; i < JSHINT.internals.length; i += 1) k = JSHINT.internals[i], e.scope = k.elem, nc(k.value, e, f);
return 0 === JSHINT.errors.length
};
return nc.data = function () {
var a, c, d, e, f, g, h = {
functions: [],
options: wb
}, i = [],
j = [];
nc.errors.length && (h.errors = nc.errors), pb && (h.json = !0);
for (f in mb) b(mb, f) && i.push({
name: f,
line: mb[f]
});
for (i.length > 0 && (h.implieds = i), Hb.length > 0 && (h.urls = Hb), g = Object.keys(Bb), g.length > 0 && (h.globals = g), d = 1; d < kb.length; d += 1) {
for (c = kb[d], a = {}, e = 0; e < ac.length; e += 1) a[ac[e]] = [];
for (e = 0; e < ac.length; e += 1) 0 === a[ac[e]].length && delete a[ac[e]];
a.name = c["(name)"], a.param = c["(params)"], a.line = c["(line)"], a.character = c["(character)"], a.last = c["(last)"], a.lastcharacter = c["(lastcharacter)"], h.functions.push(a)
}
Gb.length > 0 && (h.unused = Gb), j = [];
for (f in sb)
if ("number" == typeof sb[f]) {
h.member = sb;
break
}
return h
}, nc.jshint = nc, nc
}();
"object" == typeof exports && exports && (exports.JSHINT = JSHINT), window.CodeMirror = function () {
"use strict";

function a(c, d) {
if (!(this instanceof a)) return new a(c, d);
this.options = d = d || {};
for (var e in Me)!d.hasOwnProperty(e) && Me.hasOwnProperty(e) && (d[e] = Me[e]);
m(d);
var f = "string" == typeof d.value ? 0 : d.value.first,
g = this.display = b(c, f);
g.wrapper.CodeMirror = this, j(this), d.autofocus && !ue && fb(this), this.state = {
keyMaps: [],
overlays: [],
modeGen: 0,
overwrite: !1,
focused: !1,
suppressEdits: !1,
pasteIncoming: !1,
draggingText: !1,
highlight: new Gd
}, h(this), d.lineWrapping && (this.display.wrapper.className += " CodeMirror-wrap");
var i = d.value;
"string" == typeof i && (i = new Ye(d.value, d.mode)), Z(this, ad)(this, i), he && setTimeout(Pd(eb, this, !0), 20), hb(this);
var k;
try {
k = document.activeElement == g.input
} catch (l) {}
k || d.autofocus && !ue ? setTimeout(Pd(xb, this), 20) : yb(this), Z(this, function () {
for (var a in Le) Le.propertyIsEnumerable(a) && Le[a](this, d[a], Ne);
for (var b = 0; b < Re.length; ++b) Re[b](this)
})()
}

function b(a, b) {
var c = {}, d = c.input = Sd("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none;");
ke ? d.style.width = "1000px" : d.setAttribute("wrap", "off"), d.setAttribute("autocorrect", "off"), d.setAttribute("autocapitalize", "off"), c.inputDiv = Sd("div", [d], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"), c.scrollbarH = Sd("div", [Sd("div", null, null, "height: 1px")], "CodeMirror-hscrollbar"), c.scrollbarV = Sd("div", [Sd("div", null, null, "width: 1px")], "CodeMirror-vscrollbar"), c.scrollbarFiller = Sd("div", null, "CodeMirror-scrollbar-filler"), c.lineDiv = Sd("div"), c.selectionDiv = Sd("div", null, null, "position: relative; z-index: 1"), c.cursor = Sd("div", " ", "CodeMirror-cursor"), c.otherCursor = Sd("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor"), c.measure = Sd("div", null, "CodeMirror-measure"), c.lineSpace = Sd("div", [c.measure, c.selectionDiv, c.lineDiv, c.cursor, c.otherCursor], null, "position: relative; outline: none"), c.mover = Sd("div", [Sd("div", [c.lineSpace], "CodeMirror-lines")], null, "position: relative"), c.sizer = Sd("div", [c.mover], "CodeMirror-sizer"), c.heightForcer = Sd("div", " ", null, "position: absolute; height: " + bf + "px"), c.gutters = Sd("div", null, "CodeMirror-gutters"), c.lineGutter = null;
var e = Sd("div", [c.sizer, c.heightForcer, c.gutters], null, "position: relative; min-height: 100%");
return c.scroller = Sd("div", [e], "CodeMirror-scroll"), c.scroller.setAttribute("tabIndex", "-1"), c.wrapper = Sd("div", [c.inputDiv, c.scrollbarH, c.scrollbarV, c.scrollbarFiller, c.scroller], "CodeMirror"), ie && (c.gutters.style.zIndex = -1, c.scroller.style.paddingRight = 0), a.appendChild ? a.appendChild(c.wrapper) : a(c.wrapper), te && (d.style.width = "0px"), ke || (c.scroller.draggable = !0), pe ? (c.inputDiv.style.height = "1px", c.inputDiv.style.position = "absolute") : ie && (c.scrollbarH.style.minWidth = c.scrollbarV.style.minWidth = "18px"), c.viewOffset = c.lastSizeC = 0, c.showingFrom = c.showingTo = b, c.lineNumWidth = c.lineNumInnerWidth = c.lineNumChars = null, c.prevInput = "", c.alignWidgets = !1, c.pollingFast = !1, c.poll = new Gd, c.draggingText = !1, c.cachedCharWidth = c.cachedTextHeight = null, c.measureLineCache = [], c.measureLineCachePos = 0, c.inaccurateSelection = !1, c.maxLine = null, c.maxLineLength = 0, c.maxLineChanged = !1, c.wheelDX = c.wheelDY = c.wheelStartX = c.wheelStartY = null, c
}

function c(b) {
b.doc.mode = a.getMode(b.options, b.doc.modeOption), b.doc.iter(function (a) {
a.stateAfter && (a.stateAfter = null), a.styles && (a.styles = null)
}), b.doc.frontier = b.doc.first, F(b, 100), b.state.modeGen++, b.curOp && ab(b)
}

function d(a) {
a.options.lineWrapping ? (a.display.wrapper.className += " CodeMirror-wrap", a.display.sizer.style.minWidth = "") : (a.display.wrapper.className = a.display.wrapper.className.replace(" CodeMirror-wrap", ""), l(a)), f(a), ab(a), O(a), setTimeout(function () {
n(a.display, a.doc.height)
}, 100)
}

function e(a) {
var b = V(a.display),
c = a.options.lineWrapping,
d = c && Math.max(5, a.display.scroller.clientWidth / W(a.display) - 3);
return function (e) {
return Ec(a.doc, e) ? 0 : c ? (Math.ceil(e.text.length / d) || 1) * b : b
}
}

function f(a) {
var b = a.doc,
c = e(a);
b.iter(function (a) {
var b = c(a);
b != a.height && ed(a, b)
})
}

function g(a) {
var b = Te[a.options.keyMap].style;
a.display.wrapper.className = a.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") + (b ? " cm-keymap-" + b : "")
}

function h(a) {
a.display.wrapper.className = a.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + a.options.theme.replace(/(^|\s)\s*/g, " cm-s-"), O(a)
}

function i(a) {
j(a), ab(a)
}

function j(a) {
var b = a.display.gutters,
c = a.options.gutters;
Td(b);
for (var d = 0; d < c.length; ++d) {
var e = c[d],
f = b.appendChild(Sd("div", null, "CodeMirror-gutter " + e));
"CodeMirror-linenumbers" == e && (a.display.lineGutter = f, f.style.width = (a.display.lineNumWidth || 1) + "px")
}
b.style.display = d ? "" : "none"
}

function k(a, b) {
if (0 == b.height) return 0;
for (var c, d = b.text.length, e = b; c = Bc(e);) {
var f = c.find();
e = bd(a, f.from.line), d += f.from.ch - f.to.ch
}
for (e = b; c = Cc(e);) {
var f = c.find();
d -= e.text.length - f.from.ch, e = bd(a, f.to.line), d += e.text.length - f.to.ch
}
return d
}

function l(a) {
var b = a.display,
c = a.doc;
b.maxLine = bd(c, c.first), b.maxLineLength = k(c, b.maxLine), b.maxLineChanged = !0, c.iter(function (a) {
var d = k(c, a);
d > b.maxLineLength && (b.maxLineLength = d, b.maxLine = a)
})
}

function m(a) {
for (var b = !1, c = 0; c < a.gutters.length; ++c) "CodeMirror-linenumbers" == a.gutters[c] && (a.lineNumbers ? b = !0 : a.gutters.splice(c--, 1));
!b && a.lineNumbers && a.gutters.push("CodeMirror-linenumbers")
}

function n(a, b) {
var c = b + 2 * J(a);
a.sizer.style.minHeight = a.heightForcer.style.top = c + "px";
var d = Math.max(c, a.scroller.scrollHeight),
e = a.scroller.scrollWidth > a.scroller.clientWidth,
f = d > a.scroller.clientHeight;
f ? (a.scrollbarV.style.display = "block", a.scrollbarV.style.bottom = e ? Xd(a.measure) + "px" : "0", a.scrollbarV.firstChild.style.height = d - a.scroller.clientHeight + a.scrollbarV.clientHeight + "px") : a.scrollbarV.style.display = "", e ? (a.scrollbarH.style.display = "block", a.scrollbarH.style.right = f ? Xd(a.measure) + "px" : "0", a.scrollbarH.firstChild.style.width = a.scroller.scrollWidth - a.scroller.clientWidth + a.scrollbarH.clientWidth + "px") : a.scrollbarH.style.display = "", e && f ? (a.scrollbarFiller.style.display = "block", a.scrollbarFiller.style.height = a.scrollbarFiller.style.width = Xd(a.measure) + "px") : a.scrollbarFiller.style.display = "", qe && 0 === Xd(a.measure) && (a.scrollbarV.style.minWidth = a.scrollbarH.style.minHeight = re ? "18px" : "12px")
}

function o(a, b, c) {
var d = a.scroller.scrollTop,
e = a.wrapper.clientHeight;
"number" == typeof c ? d = c : c && (d = c.top, e = c.bottom - c.top), d = Math.floor(d - J(a));
var f = Math.ceil(d + e);
return {
from: gd(b, d),
to: gd(b, f)
}
}

function p(a) {
var b = a.display;
if (b.alignWidgets || b.gutters.firstChild && a.options.fixedGutter) {
for (var c = s(b) - b.scroller.scrollLeft + a.doc.scrollLeft, d = b.gutters.offsetWidth, e = c + "px", f = b.lineDiv.firstChild; f; f = f.nextSibling)
if (f.alignable)
for (var g = 0, h = f.alignable; g < h.length; ++g) h[g].style.left = e;
a.options.fixedGutter && (b.gutters.style.left = c + d + "px")
}
}

function q(a) {
if (!a.options.lineNumbers) return !1;
var b = a.doc,
c = r(a.options, b.first + b.size - 1),
d = a.display;
if (c.length != d.lineNumChars) {
var e = d.measure.appendChild(Sd("div", [Sd("div", c)], "CodeMirror-linenumber CodeMirror-gutter-elt")),
f = e.firstChild.offsetWidth,
g = e.offsetWidth - f;
return d.lineGutter.style.width = "", d.lineNumInnerWidth = Math.max(f, d.lineGutter.offsetWidth - g), d.lineNumWidth = d.lineNumInnerWidth + g, d.lineNumChars = d.lineNumInnerWidth ? c.length : -1, d.lineGutter.style.width = d.lineNumWidth + "px", !0
}
return !1
}

function r(a, b) {
return String(a.lineNumberFormatter(b + a.firstLineNumber))
}

function s(a) {
return Wd(a.scroller).left - Wd(a.sizer).left
}

function t(a, b, c) {
var d = a.display.showingFrom,
e = a.display.showingTo,
f = u(a, b, c);
return f && (Dd(a, "update", a), (a.display.showingFrom != d || a.display.showingTo != e) && Dd(a, "viewportChange", a, a.display.showingFrom, a.display.showingTo)), B(a), n(a.display, a.doc.height), f
}

function u(a, b, c) {
var d = a.display,
e = a.doc;
if (!d.wrapper.clientWidth) return d.showingFrom = d.showingTo = e.first, d.viewOffset = 0, void 0;
var f = o(d, e, c);
if (!(0 == b.length && f.from > d.showingFrom && f.to < d.showingTo)) {
q(a) && (b = [{
from: e.first,
to: e.first + e.size
}]);
var g = d.sizer.style.marginLeft = d.gutters.offsetWidth + "px";
d.scrollbarH.style.left = a.options.fixedGutter ? g : "0";
var h = 1 / 0;
if (a.options.lineNumbers)
for (var i = 0; i < b.length; ++i)
if (b[i].diff) {
h = b[i].from;
break
}
var j = e.first + e.size,
k = Math.max(f.from - a.options.viewportMargin, e.first),
l = Math.min(j, f.to + a.options.viewportMargin);
if (d.showingFrom < k && k - d.showingFrom < 20 && (k = Math.max(e.first, d.showingFrom)), d.showingTo > l && d.showingTo - l < 20 && (l = Math.min(j, d.showingTo)), Ee)
for (k = fd(Dc(e, bd(e, k))); j > l && Ec(e, bd(e, l));)++l;
var m = [{
from: Math.max(d.showingFrom, e.first),
to: Math.min(d.showingTo, j)
}];
if (m = m[0].from >= m[0].to ? [] : w(m, b), Ee)
for (var i = 0; i < m.length; ++i)
for (var n, p = m[i]; n = Cc(bd(e, p.to - 1));) {
var r = n.find().from.line;
if (!(r > p.from)) {
m.splice(i--, 1);
break
}
p.to = r
}
for (var s = 0, i = 0; i < m.length; ++i) {
var p = m[i];
p.from < k && (p.from = k), p.to > l && (p.to = l), p.from >= p.to ? m.splice(i--, 1) : s += p.to - p.from
}
if (s == l - k && k == d.showingFrom && l == d.showingTo) return v(a), void 0;
m.sort(function (a, b) {
return a.from - b.from
});
var t = document.activeElement;.7 * (l - k) > s && (d.lineDiv.style.display = "none"), y(a, k, l, m, h), d.lineDiv.style.display = "", document.activeElement != t && t.offsetHeight && t.focus();
var x = k != d.showingFrom || l != d.showingTo || d.lastSizeC != d.wrapper.clientHeight;
x && (d.lastSizeC = d.wrapper.clientHeight), d.showingFrom = k, d.showingTo = l, F(a, 100);
for (var z, A = d.lineDiv.offsetTop, B = d.lineDiv.firstChild; B; B = B.nextSibling)
if (B.lineObj) {
if (ie) {
var C = B.offsetTop + B.offsetHeight;
z = C - A, A = C
} else {
var D = Wd(B);
z = D.bottom - D.top
}
var E = B.lineObj.height - z;
if (2 > z && (z = V(d)), E > .001 || -.001 > E) {
ed(B.lineObj, z);
var G = B.lineObj.widgets;
if (G)
for (var i = 0; i < G.length; ++i) G[i].height = G[i].node.offsetHeight
}
}
return v(a), o(d, e, c).to > l && u(a, [], c), !0
}
}

function v(a) {
var b = a.display.viewOffset = hd(a, bd(a.doc, a.display.showingFrom));
a.display.mover.style.top = b + "px"
}

function w(a, b) {
for (var c = 0, d = b.length || 0; d > c; ++c) {
for (var e = b[c], f = [], g = e.diff || 0, h = 0, i = a.length; i > h; ++h) {
var j = a[h];
e.to <= j.from && e.diff ? f.push({
from: j.from + g,
to: j.to + g
}) : e.to <= j.from || e.from >= j.to ? f.push(j) : (e.from > j.from && f.push({
from: j.from,
to: e.from
}), e.to < j.to && f.push({
from: e.to + g,
to: j.to + g
}))
}
a = f
}
return a
}

function x(a) {
for (var b = a.display, c = {}, d = {}, e = b.gutters.firstChild, f = 0; e; e = e.nextSibling, ++f) c[a.options.gutters[f]] = e.offsetLeft, d[a.options.gutters[f]] = e.offsetWidth;
return {
fixedPos: s(b),
gutterTotalWidth: b.gutters.offsetWidth,
gutterLeft: c,
gutterWidth: d,
wrapperWidth: b.wrapper.clientWidth
}
}

function y(a, b, c, d, e) {
function f(b) {
var c = b.nextSibling;
return ke && ve && a.display.currentWheelTarget == b ? (b.style.display = "none", b.lineObj = null) : b.parentNode.removeChild(b), c
}
var g = x(a),
h = a.display,
i = a.options.lineNumbers;
d.length || ke && a.display.currentWheelTarget || Td(h.lineDiv);
var j = h.lineDiv,
k = j.firstChild,
l = d.shift(),
m = b;
for (a.doc.iter(b, c, function (b) {
if (l && l.to == m && (l = d.shift()), Ec(a.doc, b)) {
if (0 != b.height && ed(b, 0), b.widgets && k.previousSibling)
for (var c = 0; c < b.widgets.length; ++c)
if (b.widgets[c].showIfHidden) {
var h = k.previousSibling;
if (/pre/i.test(h.nodeName)) {
var n = Sd("div", null, null, "position: relative");
h.parentNode.replaceChild(n, h), n.appendChild(h), h = n
}
var o = h.appendChild(Sd("div", [b.widgets[c].node], "CodeMirror-linewidget"));
A(b.widgets[c], o, h, g)
}
} else if (l && l.from <= m && l.to > m) {
for (; k.lineObj != b;) k = f(k);
i && m >= e && k.lineNumber && Vd(k.lineNumber, r(a.options, m)), k = k.nextSibling
} else {
if (b.widgets)
for (var p, q = 0, s = k; s && 20 > q; ++q, s = s.nextSibling)
if (s.lineObj == b && /div/i.test(s.nodeName)) {
p = s;
break
}
var t = z(a, b, m, g, p);
if (t != p) j.insertBefore(t, k);
else {
for (; k != p;) k = f(k);
k = k.nextSibling
}
t.lineObj = b
}++m
}); k;) k = f(k)
}

function z(a, b, c, d, e) {
var f, g = Tc(a, b),
h = b.gutterMarkers,
i = a.display;
if (!(a.options.lineNumbers || h || b.bgClass || b.wrapClass || b.widgets)) return g;
if (e) {
e.alignable = null;
for (var j, k = !0, l = 0, m = e.firstChild; m; m = j)
if (j = m.nextSibling, /\bCodeMirror-linewidget\b/.test(m.className)) {
for (var n = 0, o = !0; n < b.widgets.length; ++n) {
var p = b.widgets[n],
q = !1;
if (p.above || (q = o, o = !1), p.node == m.firstChild) {
A(p, m, e, d), ++l, q && e.insertBefore(g, m);
break
}
}
if (n == b.widgets.length) {
k = !1;
break
}
} else e.removeChild(m);
k && l == b.widgets.length && (f = e, e.className = b.wrapClass || "")
}
if (f || (f = Sd("div", null, b.wrapClass, "position: relative"), f.appendChild(g)), b.bgClass && f.insertBefore(Sd("div", " ", b.bgClass + " CodeMirror-linebackground"), f.firstChild), a.options.lineNumbers || h) {
var s = f.insertBefore(Sd("div", null, null, "position: absolute; left: " + (a.options.fixedGutter ? d.fixedPos : -d.gutterTotalWidth) + "px"), f.firstChild);
if (a.options.fixedGutter && (f.alignable || (f.alignable = [])).push(s), !a.options.lineNumbers || h && h["CodeMirror-linenumbers"] || (f.lineNumber = s.appendChild(Sd("div", r(a.options, c), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + d.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + i.lineNumInnerWidth + "px"))), h)
for (var t = 0; t < a.options.gutters.length; ++t) {
var u = a.options.gutters[t],
v = h.hasOwnProperty(u) && h[u];
v && s.appendChild(Sd("div", [v], "CodeMirror-gutter-elt", "left: " + d.gutterLeft[u] + "px; width: " + d.gutterWidth[u] + "px"))
}
}
if (ie && (f.style.zIndex = 2), b.widgets && f != e)
for (var n = 0, w = b.widgets; n < w.length; ++n) {
var p = w[n],
x = Sd("div", [p.node], "CodeMirror-linewidget");
A(p, x, f, d), p.above ? f.insertBefore(x, a.options.lineNumbers && 0 != b.height ? s : g) : f.appendChild(x), Dd(p, "redraw")
}
return f
}

function A(a, b, c, d) {
if (a.noHScroll) {
(c.alignable || (c.alignable = [])).push(b);
var e = d.wrapperWidth;
b.style.left = d.fixedPos + "px", a.coverGutter || (e -= d.gutterTotalWidth, b.style.paddingLeft = d.gutterTotalWidth + "px"), b.style.width = e + "px"
}
a.coverGutter && (b.style.zIndex = 5, b.style.position = "relative", a.noHScroll || (b.style.marginLeft = -d.gutterTotalWidth + "px"))
}

function B(a) {
var b = a.display,
c = Mb(a.doc.sel.from, a.doc.sel.to);
c || a.options.showCursorWhenSelecting ? C(a) : b.cursor.style.display = b.otherCursor.style.display = "none", c ? b.selectionDiv.style.display = "none" : D(a);
var d = R(a, a.doc.sel.head, "div"),
e = Wd(b.wrapper),
f = Wd(b.lineDiv);
b.inputDiv.style.top = Math.max(0, Math.min(b.wrapper.clientHeight - 10, d.top + f.top - e.top)) + "px", b.inputDiv.style.left = Math.max(0, Math.min(b.wrapper.clientWidth - 10, d.left + f.left - e.left)) + "px"
}

function C(a) {
var b = a.display,
c = R(a, a.doc.sel.head, "div");
b.cursor.style.left = c.left + "px", b.cursor.style.top = c.top + "px", b.cursor.style.height = Math.max(0, c.bottom - c.top) * a.options.cursorHeight + "px", b.cursor.style.display = "", c.other ? (b.otherCursor.style.display = "", b.otherCursor.style.left = c.other.left + "px", b.otherCursor.style.top = c.other.top + "px", b.otherCursor.style.height = .85 * (c.other.bottom - c.other.top) + "px") : b.otherCursor.style.display = "none"
}

function D(a) {
function b(a, b, c, d) {
0 > b && (b = 0), g.appendChild(Sd("div", null, "CodeMirror-selected", "position: absolute; left: " + a + "px; top: " + b + "px; width: " + (null == c ? h - a : c) + "px; height: " + (d - b) + "px"))
}

function c(c, d, f, g) {
function j(b) {
return Q(a, Lb(c, b), "div", k)
}
var k = bd(e, c),
l = k.text.length,
m = g ? 1 / 0 : -1 / 0;
return Zd(id(k), d || 0, null == f ? l : f, function (a, c, e) {
var k = j("rtl" == e ? c - 1 : a),
n = j("rtl" == e ? a : c - 1),
o = k.left,
p = n.right;
n.top - k.top > 3 && (b(o, k.top, null, k.bottom), o = i, k.bottom < n.top && b(o, k.bottom, null, n.top)), null == f && c == l && (p = h), null == d && 0 == a && (o = i), m = g ? Math.min(n.top, m) : Math.max(n.bottom, m), i + 1 > o && (o = i), b(o, n.top, p - o, n.bottom)
}), m
}
var d = a.display,
e = a.doc,
f = a.doc.sel,
g = document.createDocumentFragment(),
h = d.lineSpace.offsetWidth,
i = K(a.display);
if (f.from.line == f.to.line) c(f.from.line, f.from.ch, f.to.ch);
else {
for (var j, k, l = bd(e, f.from.line), m = l, n = [f.from.line, f.from.ch]; j = Cc(m);) {
var o = j.find();
if (n.push(o.from.ch, o.to.line, o.to.ch), o.to.line == f.to.line) {
n.push(f.to.ch), k = !0;
break
}
m = bd(e, o.to.line)
}
if (k)
for (var p = 0; p < n.length; p += 3) c(n[p], n[p + 1], n[p + 2]);
else {
var q, r, s = bd(e, f.to.line);
q = f.from.ch ? c(f.from.line, f.from.ch, null, !1) : hd(a, l) - d.viewOffset, r = f.to.ch ? c(f.to.line, Bc(s) ? null : 0, f.to.ch, !0) : hd(a, s) - d.viewOffset, r > q && b(i, q, null, r)
}
}
Ud(d.selectionDiv, g), d.selectionDiv.style.display = ""
}

function E(a) {
var b = a.display;
clearInterval(b.blinker);
var c = !0;
b.cursor.style.visibility = b.otherCursor.style.visibility = "", b.blinker = setInterval(function () {
b.cursor.offsetHeight && (b.cursor.style.visibility = b.otherCursor.style.visibility = (c = !c) ? "" : "hidden")
}, a.options.cursorBlinkRate)
}

function F(a, b) {
a.doc.mode.startState && a.doc.frontier < a.display.showingTo && a.state.highlight.set(b, Pd(G, a))
}

function G(a) {
var b = a.doc;
if (b.frontier < b.first && (b.frontier = b.first), !(b.frontier >= a.display.showingTo)) {
var c, d = +new Date + a.options.workTime,
e = hc(b.mode, I(a, b.frontier)),
f = [];
b.iter(b.frontier, Math.min(b.first + b.size, a.display.showingTo + 500), function (g) {
if (b.frontier >= a.display.showingFrom) {
var h = g.styles;
g.styles = Pc(a, g, e);
for (var i = !h || h.length != g.styles.length, j = 0; !i && j < h.length; ++j) i = h[j] != g.styles[j];
i && (c && c.end == b.frontier ? c.end++ : f.push(c = {
start: b.frontier,
end: b.frontier + 1
})), g.stateAfter = hc(b.mode, e)
} else Rc(a, g, e), g.stateAfter = 0 == b.frontier % 5 ? hc(b.mode, e) : null;
return ++b.frontier, +new Date > d ? (F(a, a.options.workDelay), !0) : void 0
}), f.length && Z(a, function () {
for (var a = 0; a < f.length; ++a) ab(this, f[a].start, f[a].end)
})()
}
}

function H(a, b) {
for (var c, d, e = a.doc, f = b, g = b - 100; f > g; --f) {
if (f <= e.first) return e.first;
var h = bd(e, f - 1);
if (h.stateAfter) return f;
var i = Hd(h.text, null, a.options.tabSize);
(null == d || c > i) && (d = f - 1, c = i)
}
return d
}

function I(a, b) {
var c = a.doc,
d = a.display;
if (!c.mode.startState) return !0;
var e = H(a, b),
f = e > c.first && bd(c, e - 1).stateAfter;
return f = f ? hc(c.mode, f) : ic(c.mode), c.iter(e, b, function (g) {
Rc(a, g, f);
var h = e == b - 1 || 0 == e % 5 || e >= d.showingFrom && e < d.showingTo;
g.stateAfter = h ? hc(c.mode, f) : null, ++e
}), f
}

function J(a) {
return a.lineSpace.offsetTop
}

function K(a) {
var b = Ud(a.measure, Sd("pre", null, null, "text-align: left")).appendChild(Sd("span", "x"));
return b.offsetLeft
}

function L(a, b, c, d) {
var e = -1;
d = d || M(a, b);
for (var f = c;; f += e) {
var g = d[f];
if (g) break;
0 > e && 0 == f && (e = 1)
}
return {
left: c > f ? g.right : g.left,
right: f > c ? g.left : g.right,
top: g.top,
bottom: g.bottom
}
}

function M(a, b) {
for (var c = a.display, d = a.display.measureLineCache, e = 0; e < d.length; ++e) {
var f = d[e];
if (f.text == b.text && f.markedSpans == b.markedSpans && c.scroller.clientWidth == f.width && f.classes == b.textClass + "|" + b.bgClass + "|" + b.wrapClass) return f.measure
}
var g = N(a, b),
f = {
text: b.text,
width: c.scroller.clientWidth,
markedSpans: b.markedSpans,
measure: g,
classes: b.textClass + "|" + b.bgClass + "|" + b.wrapClass
};
return 16 == d.length ? d[++c.measureLineCachePos % 16] = f : d.push(f), g
}

function N(a, b) {
var c = a.display,
d = Od(b.text.length),
e = Tc(a, b, d);
if (he && !ie && !a.options.lineWrapping && e.childNodes.length > 100) {
for (var f = document.createDocumentFragment(), g = 10, h = e.childNodes.length, i = 0, j = Math.ceil(h / g); j > i; ++i) {
for (var k = Sd("div", null, null, "display: inline-block"), l = 0; g > l && h; ++l) k.appendChild(e.firstChild), --h;
f.appendChild(k)
}
e.appendChild(f)
}
Ud(c.measure, e);
var m = Wd(c.lineDiv),
n = [],
o = Od(b.text.length),
p = e.offsetHeight;
je && c.measure.first != e && Ud(c.measure, e);
for (var q, i = 0; i < d.length; ++i)
if (q = d[i]) {
for (var r = Wd(q), s = Math.max(0, r.top - m.top), t = Math.min(r.bottom - m.top, p), l = 0; l < n.length; l += 2) {
var u = n[l],
v = n[l + 1];
if (!(u > t || s > v) && (s >= u && v >= t || u >= s && t >= v || Math.min(t, v) - Math.max(s, u) >= t - s >> 1)) {
n[l] = Math.min(s, u), n[l + 1] = Math.max(t, v);
break
}
}
l == n.length && n.push(s, t);
var w = r.right;
q.measureRight && (w = Wd(q.measureRight).left), o[i] = {
left: r.left - m.left,
right: w - m.left,
top: l
}
}
for (var q, i = 0; i < o.length; ++i)
if (q = o[i]) {
var x = q.top;
q.top = n[x], q.bottom = n[x + 1]
}
if (!a.options.lineWrapping) {
var y = e.lastChild;
3 == y.nodeType && (y = e.appendChild(Sd("span", "​"))), o.width = Wd(y).right - m.left
}
return o
}

function O(a) {
a.display.measureLineCache.length = a.display.measureLineCachePos = 0, a.display.cachedCharWidth = a.display.cachedTextHeight = null, a.display.maxLineChanged = !0, a.display.lineNumChars = null
}

function P(a, b, c, d) {
if (b.widgets)
for (var e = 0; e < b.widgets.length; ++e)
if (b.widgets[e].above) {
var f = Jc(b.widgets[e]);
c.top += f, c.bottom += f
}
if ("line" == d) return c;
d || (d = "local");
var g = hd(a, b);
if ("local" != d && (g -= a.display.viewOffset), "page" == d) {
var h = Wd(a.display.lineSpace);
g += h.top + (window.pageYOffset || (document.documentElement || document.body).scrollTop);
var i = h.left + (window.pageXOffset || (document.documentElement || document.body).scrollLeft);
c.left += i, c.right += i
}
return c.top += g, c.bottom += g, c
}

function Q(a, b, c, d) {
return d || (d = bd(a.doc, b.line)), P(a, d, L(a, d, b.ch), c)
}

function R(a, b, c, d, e) {
function f(b, f) {
var g = L(a, d, b, e);
return f ? g.left = g.right : g.right = g.left, P(a, d, g, c)
}
d = d || bd(a.doc, b.line), e || (e = M(a, d));
var g = id(d),
h = b.ch;
if (!g) return f(h);
for (var i, j, k = g[0].level, l = 0; l < g.length; ++l) {
var m, n, o = g[l],
p = o.level % 2;
if (o.from < h && o.to > h) return f(h, p);
var q = p ? o.to : o.from,
r = p ? o.from : o.to;
if (q == h) n = l && o.level < (m = g[l - 1]).level ? f(m.level % 2 ? m.from : m.to - 1, !0) : f(p && o.from != o.to ? h - 1 : h), p == k ? i = n : j = n;
else if (r == h) {
var m = l < g.length - 1 && g[l + 1];
if (!p && m && m.from == m.to) continue;
n = m && o.level < m.level ? f(m.level % 2 ? m.to - 1 : m.from) : f(p ? h : h - 1, !0), p == k ? i = n : j = n
}
}
return k && !h && (j = f(g[0].to - 1)), i ? (j && (i.other = j), i) : j
}

function S(a, b, c) {
var d = new Lb(a, b);
return c && (d.outside = !0), d
}

function T(a, b, c) {
var d = a.doc;
if (c += a.display.viewOffset, 0 > c) return S(d.first, 0, !0);
var e = gd(d, c),
f = d.first + d.size - 1;
if (e > f) return S(d.first + d.size - 1, bd(d, f).text.length, !0);
for (0 > b && (b = 0);;) {
var g = bd(d, e),
h = U(a, g, e, b, c),
i = Cc(g),
j = i && i.find();
if (!(i && h.ch >= j.from.ch)) return h;
e = j.to.line
}
}

function U(a, b, c, d, e) {
function f(d) {
var e = R(a, Lb(c, d), "line", b, j);
return h = !0, g > e.bottom ? Math.max(0, e.left - i) : g < e.top ? e.left + i : (h = !1, e.left)
}
var g = e - hd(a, b),
h = !1,
i = a.display.wrapper.clientWidth,
j = M(a, b),
k = id(b),
l = b.text.length,
m = ae(b),
n = be(b),
o = f(m),
p = h,
q = f(n),
r = h;
if (d > q) return S(c, n, r);
for (;;) {
if (k ? n == m || n == ee(b, m, 1) : 1 >= n - m) {
for (var s = q - d > d - o, t = s ? m : n; ff.test(b.text.charAt(t));)++t;
var u = S(c, t, s ? p : r);
return u.after = s, u
}
var v = Math.ceil(l / 2),
w = m + v;
if (k) {
w = m;
for (var x = 0; v > x; ++x) w = ee(b, w, 1)
}
var y = f(w);
y > d ? (n = w, q = y, (r = h) && (q += 1e3), l -= v) : (m = w, o = y, p = h, l = v)
}
}

function V(a) {
if (null != a.cachedTextHeight) return a.cachedTextHeight;
if (null == ye) {
ye = Sd("pre");
for (var b = 0; 49 > b; ++b) ye.appendChild(document.createTextNode("x")), ye.appendChild(Sd("br"));
ye.appendChild(document.createTextNode("x"))
}
Ud(a.measure, ye);
var c = ye.offsetHeight / 50;
return c > 3 && (a.cachedTextHeight = c), Td(a.measure), c || 1
}

function W(a) {
if (null != a.cachedCharWidth) return a.cachedCharWidth;
var b = Sd("span", "x"),
c = Sd("pre", [b]);
Ud(a.measure, c);
var d = b.offsetWidth;
return d > 2 && (a.cachedCharWidth = d), d || 10
}

function X(a) {
a.curOp = {
changes: [],
updateInput: null,
userSelChange: null,
textChanged: null,
selectionChanged: !1,
updateMaxLine: !1,
updateScrollPos: !1,
id: ++Fe
}, af++ || (_e = [])
}

function Y(a) {
var b = a.curOp,
c = a.doc,
d = a.display;
if (a.curOp = null, b.updateMaxLine && l(a), d.maxLineChanged && !a.options.lineWrapping) {
var e = M(a, d.maxLine).width;
d.sizer.style.minWidth = Math.max(0, e + 3 + bf) + "px", d.maxLineChanged = !1;
var f = Math.max(0, d.sizer.offsetLeft + d.sizer.offsetWidth - d.scroller.clientWidth);
f < c.scrollLeft && !b.updateScrollPos && pb(a, Math.min(d.scroller.scrollLeft, f), !0)
}
var g, h;
if (b.updateScrollPos) g = b.updateScrollPos;
else if (b.selectionChanged && d.scroller.clientHeight) {
var i = R(a, c.sel.head);
g = _b(a, i.left, i.top, i.left, i.bottom)
}(b.changes.length || g && null != g.scrollTop) && (h = t(a, b.changes, g && g.scrollTop)), !h && b.selectionChanged && B(a), b.updateScrollPos ? (d.scroller.scrollTop = d.scrollbarV.scrollTop = c.scrollTop = g.scrollTop, d.scroller.scrollLeft = d.scrollbarH.scrollLeft = c.scrollLeft = g.scrollLeft, p(a)) : g && Yb(a), b.selectionChanged && E(a), a.state.focused && b.updateInput && eb(a, b.userSelChange);
var j = b.maybeHiddenMarkers,
k = b.maybeUnhiddenMarkers;
if (j)
for (var m = 0; m < j.length; ++m) j[m].lines.length || Cd(j[m], "hide");
if (k)
for (var m = 0; m < k.length; ++m) k[m].lines.length && Cd(k[m], "unhide");
var n;
if (--af || (n = _e, _e = null), b.textChanged && Cd(a, "change", a, b.textChanged), b.selectionChanged && Cd(a, "cursorActivity", a), n)
for (var m = 0; m < n.length; ++m) n[m]()
}

function Z(a, b) {
return function () {
var c = a || this,
d = !c.curOp;
d && X(c);
try {
var e = b.apply(c, arguments)
} finally {
d && Y(c)
}
return e
}
}

function $(a) {
return function () {
var b, c = this.cm && !this.cm.curOp;
c && X(this.cm);
try {
b = a.apply(this, arguments)
} finally {
c && Y(this.cm)
}
return b
}
}

function _(a, b) {
var c, d = !a.curOp;
d && X(a);
try {
c = b()
} finally {
d && Y(a)
}
return c
}

function ab(a, b, c, d) {
null == b && (b = a.doc.first), null == c && (c = a.doc.first + a.doc.size), a.curOp.changes.push({
from: b,
to: c,
diff: d
})
}

function bb(a) {
a.display.pollingFast || a.display.poll.set(a.options.pollInterval, function () {
db(a), a.state.focused && bb(a)
})
}

function cb(a) {
function b() {
var d = db(a);
d || c ? (a.display.pollingFast = !1, bb(a)) : (c = !0, a.display.poll.set(60, b))
}
var c = !1;
a.display.pollingFast = !0, a.display.poll.set(20, b)
}

function db(a) {
var b = a.display.input,
c = a.display.prevInput,
d = a.doc,
e = d.sel;
if (!a.state.focused || mf(b) || gb(a)) return !1;
var f = b.value;
if (f == c && Mb(e.from, e.to)) return !1;
if (he && f && 0 === b.selectionStart) return eb(a, !0), !1;
var g = !a.curOp;
g && X(a), e.shift = !1;
for (var h = 0, i = Math.min(c.length, f.length); i > h && c[h] == f[h];)++h;
var j = e.from,
k = e.to;
h < c.length ? j = Lb(j.line, j.ch - (c.length - h)) : a.state.overwrite && Mb(j, k) && !a.state.pasteIncoming && (k = Lb(k.line, Math.min(bd(d, k.line).text.length, k.ch + (f.length - h))));
var l = a.curOp.updateInput;
return Eb(a.doc, {
from: j,
to: k,
text: lf(f.slice(h)),
origin: a.state.pasteIncoming ? "paste" : "+input"
}, "end"), a.curOp.updateInput = l, f.length > 1e3 ? b.value = a.display.prevInput = "" : a.display.prevInput = f, g && Y(a), a.state.pasteIncoming = !1, !0
}

function eb(a, b) {
var c, d, e = a.doc;
Mb(e.sel.from, e.sel.to) ? b && (a.display.prevInput = a.display.input.value = "") : (a.display.prevInput = "", c = nf && (e.sel.to.line - e.sel.from.line > 100 || (d = a.getSelection()).length > 1e3), a.display.input.value = c ? "-" : d || a.getSelection(), a.state.focused && Kd(a.display.input)), a.display.inaccurateSelection = c
}

function fb(a) {
"nocursor" == a.options.readOnly || ue && document.activeElement == a.display.input || a.display.input.focus()
}

function gb(a) {
return a.options.readOnly || a.doc.cantEdit
}

function hb(a) {
function b() {
a.state.focused && setTimeout(Pd(fb, a), 0)
}

function c() {
g.cachedCharWidth = g.cachedTextHeight = null, O(a), _(a, Pd(ab, a))
}

function d() {
for (var a = g.wrapper.parentNode; a && a != document.body; a = a.parentNode);
a ? setTimeout(d, 5e3) : Bd(window, "resize", c)
}

function e(b) {
a.options.onDragEvent && a.options.onDragEvent(a, ud(b)) || xd(b)
}

function f() {
g.inaccurateSelection && (g.prevInput = "", g.inaccurateSelection = !1, g.input.value = a.getSelection(), Kd(g.input))
}
var g = a.display;
Ad(g.scroller, "mousedown", Z(a, kb)), Ad(g.scroller, "dblclick", Z(a, vd)), Ad(g.lineSpace, "selectstart", function (a) {
ib(g, a) || vd(a)
}), Ce || Ad(g.scroller, "contextmenu", function (b) {
zb(a, b)
}), Ad(g.scroller, "scroll", function () {
ob(a, g.scroller.scrollTop), pb(a, g.scroller.scrollLeft, !0), Cd(a, "scroll", a)
}), Ad(g.scrollbarV, "scroll", function () {
ob(a, g.scrollbarV.scrollTop)
}), Ad(g.scrollbarH, "scroll", function () {
pb(a, g.scrollbarH.scrollLeft)
}), Ad(g.scroller, "mousewheel", function (b) {
qb(a, b)
}), Ad(g.scroller, "DOMMouseScroll", function (b) {
qb(a, b)
}), Ad(g.scrollbarH, "mousedown", b), Ad(g.scrollbarV, "mousedown", b), Ad(g.wrapper, "scroll", function () {
g.wrapper.scrollTop = g.wrapper.scrollLeft = 0
}), Ad(window, "resize", c), setTimeout(d, 5e3), Ad(g.input, "keyup", Z(a, function (b) {
a.options.onKeyEvent && a.options.onKeyEvent(a, ud(b)) || 16 == b.keyCode && (a.doc.sel.shift = !1)
})), Ad(g.input, "input", Pd(cb, a)), Ad(g.input, "keydown", Z(a, vb)), Ad(g.input, "keypress", Z(a, wb)), Ad(g.input, "focus", Pd(xb, a)), Ad(g.input, "blur", Pd(yb, a)), a.options.dragDrop && (Ad(g.scroller, "dragstart", function (b) {
nb(a, b)
}), Ad(g.scroller, "dragenter", e), Ad(g.scroller, "dragover", e), Ad(g.scroller, "drop", Z(a, lb))), Ad(g.scroller, "paste", function (b) {
ib(g, b) || (fb(a), cb(a))
}), Ad(g.input, "paste", function () {
a.state.pasteIncoming = !0, cb(a)
}), Ad(g.input, "cut", f), Ad(g.input, "copy", f), pe && Ad(g.sizer, "mouseup", function () {
document.activeElement == g.input && g.input.blur(), fb(a)
})
}

function ib(a, b) {
for (var c = yd(b); c != a.wrapper; c = c.parentNode) {
if (!c) return !0;
if (/\bCodeMirror-(?:line)?widget\b/.test(c.className) || c.parentNode == a.sizer && c != a.mover) return !0
}
}

function jb(a, b, c) {
var d = a.display;
if (!c) {
var e = yd(b);
if (e == d.scrollbarH || e == d.scrollbarH.firstChild || e == d.scrollbarV || e == d.scrollbarV.firstChild || e == d.scrollbarFiller) return null
}
var f, g, h = Wd(d.lineSpace);
try {
f = b.clientX, g = b.clientY
} catch (b) {
return null
}
return T(a, f - h.left, g - h.top)
}

function kb(a) {
function b(a) {
if ("single" == k) return Tb(e.doc, Qb(g, i), a), void 0;
if (p = Qb(g, p), q = Qb(g, q), "double" == k) {
var b = ec(bd(g, a.line).text, a);
Nb(a, p) ? Tb(e.doc, b.from, q) : Tb(e.doc, p, b.to)
} else "triple" == k && (Nb(a, p) ? Tb(e.doc, q, Qb(g, Lb(a.line, 0))) : Tb(e.doc, p, Qb(g, Lb(a.line + 1, 0))))
}

function c(a) {
var d = ++s,
h = jb(e, a, !0);
if (h)
if (Mb(h, m)) {
var i = a.clientY < r.top ? -20 : a.clientY > r.bottom ? 20 : 0;
i && setTimeout(Z(e, function () {
s == d && (f.scroller.scrollTop += i, c(a))
}), 50)
} else {
e.state.focused || xb(e), m = h, b(h);
var j = o(f, g);
(h.line >= j.to || h.line < j.from) && setTimeout(Z(e, function () {
s == d && c(a)
}), 150)
}
}

function d(a) {
s = 1 / 0;
var c = jb(e, a);
c && b(c), vd(a), fb(e), Bd(document, "mousemove", t), Bd(document, "mouseup", u)
}
var e = this,
f = e.display,
g = e.doc,
h = g.sel;
if (h.shift = a.shiftKey, ib(f, a)) return ke || (f.scroller.draggable = !1, setTimeout(function () {
f.scroller.draggable = !0
}, 100)), void 0;
if (!mb(e, a)) {
var i = jb(e, a);
switch (zd(a)) {
case 3:
return Ce && zb.call(e, e, a), void 0;
case 2:
return i && Tb(e.doc, i), setTimeout(Pd(fb, e), 20), vd(a), void 0
}
if (!i) return yd(a) == f.scroller && vd(a), void 0;
e.state.focused || xb(e);
var j = +new Date,
k = "single";
if (Ae && Ae.time > j - 400 && Mb(Ae.pos, i)) k = "triple", vd(a), setTimeout(Pd(fb, e), 20), fc(e, i.line);
else if (ze && ze.time > j - 400 && Mb(ze.pos, i)) {
k = "double", Ae = {
time: j,
pos: i
}, vd(a);
var l = ec(bd(g, i.line).text, i);
Tb(e.doc, l.from, l.to)
} else ze = {
time: j,
pos: i
};
var m = i;
if (e.options.dragDrop && gf && !gb(e) && !Mb(h.from, h.to) && !Nb(i, h.from) && !Nb(h.to, i) && "single" == k) {
var n = Z(e, function (b) {
ke && (f.scroller.draggable = !1), e.state.draggingText = !1, Bd(document, "mouseup", n), Bd(f.scroller, "drop", n), Math.abs(a.clientX - b.clientX) + Math.abs(a.clientY - b.clientY) < 10 && (vd(b), Tb(e.doc, i), fb(e))
});
return ke && (f.scroller.draggable = !0), e.state.draggingText = n, f.scroller.dragDrop && f.scroller.dragDrop(), Ad(document, "mouseup", n), Ad(f.scroller, "drop", n), void 0
}
vd(a), "single" == k && Tb(e.doc, Qb(g, i));
var p = h.from,
q = h.to,
r = Wd(f.wrapper),
s = 0,
t = Z(e, function (a) {
he || zd(a) ? c(a) : d(a)
}),
u = Z(e, d);
Ad(document, "mousemove", t), Ad(document, "mouseup", u)
}
}

function lb(a) {
var b = this;
if (!(ib(b.display, a) || b.options.onDragEvent && b.options.onDragEvent(b, ud(a)))) {
vd(a);
var c = jb(b, a, !0),
d = a.dataTransfer.files;
if (c && !gb(b))
if (d && d.length && window.FileReader && window.File)
for (var e = d.length, f = Array(e), g = 0, h = function (a, d) {
var h = new FileReader;
h.onload = function () {
f[d] = h.result, ++g == e && (c = Qb(b.doc, c), Kb(b.doc, f.join(""), c, "around", "paste"))
}, h.readAsText(a)
}, i = 0; e > i; ++i) h(d[i], i);
else {
if (b.state.draggingText && !Nb(c, b.doc.sel.from) && !Nb(b.doc.sel.to, c)) return b.state.draggingText(a), setTimeout(Pd(fb, b), 20), void 0;
try {
var f = a.dataTransfer.getData("Text");
if (f) {
var j = b.doc.sel.from,
k = b.doc.sel.to;
Vb(b.doc, c, c), b.state.draggingText && Kb(b.doc, "", j, k, "paste"), b.replaceSelection(f, null, "paste"), fb(b), xb(b)
}
} catch (a) {}
}
}
}

function mb(a, b) {
var c = a.display;
try {
var d = b.clientX,
e = b.clientY
} catch (b) {
return !1
}
if (d >= Math.floor(Wd(c.gutters).right)) return !1;
if (vd(b), !Fd(a, "gutterClick")) return !0;
var f = Wd(c.lineDiv);
if (e > f.bottom) return !0;
e -= f.top - c.viewOffset;
for (var g = 0; g < a.options.gutters.length; ++g) {
var h = c.gutters.childNodes[g];
if (h && Wd(h).right >= d) {
var i = gd(a.doc, e),
j = a.options.gutters[g];
Dd(a, "gutterClick", a, i, j, b);
break
}
}
return !0
}

function nb(a, b) {
if (!ib(a.display, b)) {
var c = a.getSelection();
if (b.dataTransfer.setData("Text", c), b.dataTransfer.setDragImage && !oe) {
var d = Sd("img", null, null, "position: fixed; left: 0; top: 0;");
ne && (d.width = d.height = 1, a.display.wrapper.appendChild(d), d._top = d.offsetTop), b.dataTransfer.setDragImage(d, 0, 0), ne && d.parentNode.removeChild(d)
}
}
}

function ob(a, b) {
Math.abs(a.doc.scrollTop - b) < 2 || (a.doc.scrollTop = b, ge || t(a, [], b), a.display.scroller.scrollTop != b && (a.display.scroller.scrollTop = b), a.display.scrollbarV.scrollTop != b && (a.display.scrollbarV.scrollTop = b), ge && t(a, []))
}

function pb(a, b, c) {
(c ? b == a.doc.scrollLeft : Math.abs(a.doc.scrollLeft - b) < 2) || (b = Math.min(b, a.display.scroller.scrollWidth - a.display.scroller.clientWidth), a.doc.scrollLeft = b, p(a), a.display.scroller.scrollLeft != b && (a.display.scroller.scrollLeft = b), a.display.scrollbarH.scrollLeft != b && (a.display.scrollbarH.scrollLeft = b))
}

function qb(a, b) {
var c = b.wheelDeltaX,
d = b.wheelDeltaY;
if (null == c && b.detail && b.axis == b.HORIZONTAL_AXIS && (c = b.detail), null == d && b.detail && b.axis == b.VERTICAL_AXIS ? d = b.detail : null == d && (d = b.wheelDelta), d && ve && ke)
for (var e = b.target; e != g; e = e.parentNode)
if (e.lineObj) {
a.display.currentWheelTarget = e;
break
}
var f = a.display,
g = f.scroller;
if (c && !ge && !ne && null != He) return d && ob(a, Math.max(0, Math.min(g.scrollTop + d * He, g.scrollHeight - g.clientHeight))), pb(a, Math.max(0, Math.min(g.scrollLeft + c * He, g.scrollWidth - g.clientWidth))), vd(b), f.wheelStartX = null, void 0;
if (d && null != He) {
var h = d * He,
i = a.doc.scrollTop,
j = i + f.wrapper.clientHeight;
0 > h ? i = Math.max(0, i + h - 50) : j = Math.min(a.doc.height, j + h + 50), t(a, [], {
top: i,
bottom: j
})
}
20 > Ge && (null == f.wheelStartX ? (f.wheelStartX = g.scrollLeft, f.wheelStartY = g.scrollTop, f.wheelDX = c, f.wheelDY = d, setTimeout(function () {
if (null != f.wheelStartX) {
var a = g.scrollLeft - f.wheelStartX,
b = g.scrollTop - f.wheelStartY,
c = b && f.wheelDY && b / f.wheelDY || a && f.wheelDX && a / f.wheelDX;
f.wheelStartX = f.wheelStartY = null, c && (He = (He * Ge + c) / (Ge + 1), ++Ge)
}
}, 200)) : (f.wheelDX += c, f.wheelDY += d))
}

function rb(a, b, c) {
if ("string" == typeof b && (b = Se[b], !b)) return !1;
a.display.pollingFast && db(a) && (a.display.pollingFast = !1);
var d = a.doc,
e = d.sel.shift,
f = !1;
try {
gb(a) && (a.state.suppressEdits = !0), c && (d.sel.shift = !1), f = b(a) != cf
} finally {
d.sel.shift = e, a.state.suppressEdits = !1
}
return f
}

function sb(a) {
var b = a.state.keyMaps.slice(0);
return b.push(a.options.keyMap), a.options.extraKeys && b.unshift(a.options.extraKeys), b
}

function tb(a, b) {
var c = jc(a.options.keyMap),
d = c.auto;
clearTimeout(Ie), d && !lc(b) && (Ie = setTimeout(function () {
jc(a.options.keyMap) == c && (a.options.keyMap = d.call ? d.call(null, a) : d)
}, 50));
var e = mc(b, !0),
f = !1;
if (!e) return !1;
var g = sb(a);
return f = b.shiftKey ? kc("Shift-" + e, g, function (b) {
return rb(a, b, !0)
}) || kc(e, g, function (b) {
return "string" == typeof b && /^go[A-Z]/.test(b) ? rb(a, b) : void 0
}) : kc(e, g, function (b) {
return rb(a, b)
}), "stop" == f && (f = !1), f && (vd(b), E(a), je && (b.oldKeyCode = b.keyCode, b.keyCode = 0)), f
}

function ub(a, b, c) {
var d = kc("'" + c + "'", sb(a), function (b) {
return rb(a, b, !0)
});
return d && (vd(b), E(a)), d
}

function vb(a) {
var b = this;
if (b.state.focused || xb(b), he && 27 == a.keyCode && (a.returnValue = !1), !b.options.onKeyEvent || !b.options.onKeyEvent(b, ud(a))) {
var c = a.keyCode;
b.doc.sel.shift = 16 == c || a.shiftKey;
var d = tb(b, a);
ne && (Ke = d ? c : null, !d && 88 == c && !nf && (ve ? a.metaKey : a.ctrlKey) && b.replaceSelection(""))
}
}

function wb(a) {
var b = this;
if (!b.options.onKeyEvent || !b.options.onKeyEvent(b, ud(a))) {
var c = a.keyCode,
d = a.charCode;
if (ne && c == Ke) return Ke = null, vd(a), void 0;
if (!(ne && (!a.which || a.which < 10) || pe) || !tb(b, a)) {
var e = String.fromCharCode(null == d ? c : d);
this.options.electricChars && this.doc.mode.electricChars && this.options.smartIndent && !gb(this) && this.doc.mode.electricChars.indexOf(e) > -1 && setTimeout(Z(b, function () {
ac(b, b.doc.sel.to.line, "smart")
}), 75), ub(b, a, e) || cb(b)
}
}
}

function xb(a) {
"nocursor" != a.options.readOnly && (a.state.focused || (Cd(a, "focus", a), a.state.focused = !0, -1 == a.display.wrapper.className.search(/\bCodeMirror-focused\b/) && (a.display.wrapper.className += " CodeMirror-focused"), eb(a, !0)), bb(a), E(a))
}

function yb(a) {
a.state.focused && (Cd(a, "blur", a), a.state.focused = !1, a.display.wrapper.className = a.display.wrapper.className.replace(" CodeMirror-focused", "")), clearInterval(a.display.blinker), setTimeout(function () {
a.state.focused || (a.doc.sel.shift = !1)
}, 150)
}

function zb(a, b) {
function c() {
if (d.inputDiv.style.position = "relative", d.input.style.cssText = h, je && (d.scrollbarV.scrollTop = d.scroller.scrollTop = g), bb(a), null != d.input.selectionStart && (!he || je)) {
clearTimeout(Je);
var b = d.input.value = " " + (Mb(e.from, e.to) ? "" : d.input.value),
c = 0;
d.prevInput = " ", d.input.selectionStart = 1, d.input.selectionEnd = b.length;
var f = function () {
" " == d.prevInput && 0 == d.input.selectionStart ? Z(a, Se.selectAll)(a) : c++ < 10 ? Je = setTimeout(f, 500) : eb(a)
};
Je = setTimeout(f, 200)
}
}
var d = a.display,
e = a.doc.sel;
if (!ib(d, b)) {
var f = jb(a, b),
g = d.scroller.scrollTop;
if (f && !ne) {
(Mb(e.from, e.to) || Nb(f, e.from) || !Nb(f, e.to)) && Z(a, Vb)(a.doc, f, f);
var h = d.input.style.cssText;
if (d.inputDiv.style.position = "absolute", d.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (b.clientY - 5) + "px; left: " + (b.clientX - 5) + "px; z-index: 1000; background: white; outline: none;" + "border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);", fb(a), eb(a, !0), Mb(e.from, e.to) && (d.input.value = d.prevInput = " "), Ce) {
xd(b);
var i = function () {
Bd(window, "mouseup", i), setTimeout(c, 20)
};
Ad(window, "mouseup", i)
} else setTimeout(c, 50)
}
}
}

function Ab(a) {
return Lb(a.from.line + a.text.length - 1, Jd(a.text).length + (1 == a.text.length ? a.from.ch : 0))
}

function Bb(a, b, c) {
if (!Nb(b.from, c)) return Qb(a, c);
var d = b.text.length - 1 - (b.to.line - b.from.line);
if (c.line > b.to.line + d) {
var e = c.line - d,
f = a.first + a.size - 1;
return e > f ? Lb(f, bd(a, f).text.length) : Rb(c, bd(a, e).text.length)
}
if (c.line == b.to.line + d) return Rb(c, Jd(b.text).length + (1 == b.text.length ? b.from.ch : 0) + bd(a, b.to.line).text.length - b.to.ch);
var g = c.line - b.from.line;
return Rb(c, b.text[g].length + (g ? 0 : b.from.ch))
}

function Cb(a, b, c) {
if (c && "object" == typeof c) return {
anchor: Bb(a, b, c.anchor),
head: Bb(a, b, c.head)
};
if ("start" == c) return {
anchor: b.from,
head: b.from
};
var d = Ab(b);
if ("around" == c) return {
anchor: b.from,
head: d
};
if ("end" == c) return {
anchor: d,
head: d
};
var e = function (a) {
if (Nb(a, b.from)) return a;
if (!Nb(b.to, a)) return d;
var c = a.line + b.text.length - (b.to.line - b.from.line) - 1,
e = a.ch;
return a.line == b.to.line && (e += d.ch - b.to.ch), Lb(c, e)
};
return {
anchor: e(a.sel.anchor),
head: e(a.sel.head)
}
}

function Db(a, b) {
var c = {
canceled: !1,
from: b.from,
to: b.to,
text: b.text,
origin: b.origin,
update: function (b, c, d, e) {
b && (this.from = Qb(a, b)), c && (this.to = Qb(a, c)), d && (this.text = d), void 0 !== e && (this.origin = e)
},
cancel: function () {
this.canceled = !0
}
};
return Cd(a, "beforeChange", a, c), a.cm && Cd(a.cm, "beforeChange", a.cm, c), c.canceled ? null : {
from: c.from,
to: c.to,
text: c.text,
origin: c.origin
}
}

function Eb(a, b, c, d) {
if (a.cm) {
if (!a.cm.curOp) return Z(a.cm, Eb)(a, b, c, d);
if (a.cm.state.suppressEdits) return
}
if (!(Fd(a, "beforeChange") || a.cm && Fd(a.cm, "beforeChange")) || (b = Db(a, b))) {
var e = De && !d && zc(a, b.from, b.to);
if (e) {
for (var f = e.length - 1; f >= 1; --f) Fb(a, {
from: e[f].from,
to: e[f].to,
text: [""]
});
e.length && Fb(a, {
from: e[0].from,
to: e[0].to,
text: b.text
}, c)
} else Fb(a, b, c)
}
}

function Fb(a, b, c) {
var d = Cb(a, b, c);
md(a, b, d, a.cm ? a.cm.curOp.id : 0 / 0), Ib(a, b, d, xc(a, b));
var e = [];
_c(a, function (a, c) {
c || -1 != Ld(e, a.history) || (sd(a.history, b), e.push(a.history)), Ib(a, b, null, xc(a, b))
})
}

function Gb(a, b) {
var c = a.history,
d = ("undo" == b ? c.done : c.undone).pop();
if (d) {
c.dirtyCounter += "undo" == b ? -1 : 1;
var e = {
changes: [],
anchorBefore: d.anchorAfter,
headBefore: d.headAfter,
anchorAfter: d.anchorBefore,
headAfter: d.headBefore
};
("undo" == b ? c.undone : c.done).push(e);
for (var f = d.changes.length - 1; f >= 0; --f) {
var g = d.changes[f];
g.origin = b, e.changes.push(ld(a, g));
var h = f ? Cb(a, g, null) : {
anchor: d.anchorBefore,
head: d.headBefore
};
Ib(a, g, h, yc(a, g));
var i = [];
_c(a, function (a, b) {
b || -1 != Ld(i, a.history) || (sd(a.history, g), i.push(a.history)), Ib(a, g, null, yc(a, g))
})
}
}
}

function Hb(a, b) {
function c(a) {
return Lb(a.line + b, a.ch)
}
a.first += b, a.cm && ab(a.cm, a.first, a.first, b), a.sel.head = c(a.sel.head), a.sel.anchor = c(a.sel.anchor), a.sel.from = c(a.sel.from), a.sel.to = c(a.sel.to)
}

function Ib(a, b, c, d) {
if (a.cm && !a.cm.curOp) return Z(a.cm, Ib)(a, b, c, d);
if (b.to.line < a.first) return Hb(a, b.text.length - 1 - (b.to.line - b.from.line)), void 0;
if (!(b.from.line > a.lastLine())) {
if (b.from.line < a.first) {
var e = b.text.length - 1 - (a.first - b.from.line);
Hb(a, e), b = {
from: Lb(a.first, 0),
to: Lb(b.to.line + e, b.to.ch),
text: [Jd(b.text)],
origin: b.origin
}
}
var f = a.lastLine();
b.to.line > f && (b = {
from: b.from,
to: Lb(f, bd(a, f).text.length),
text: [b.text[0]],
origin: b.origin
}), c || (c = Cb(a, b, null)), a.cm ? Jb(a.cm, b, d, c) : Yc(a, b, d, c)
}
}

function Jb(a, b, c, d) {
var f = a.doc,
g = a.display,
h = b.from,
i = b.to,
j = !1,
l = h.line;
a.options.lineWrapping || (l = fd(Dc(f, bd(f, h.line))), f.iter(l, i.line + 1, function (a) {
return a == g.maxLine ? (j = !0, !0) : void 0
})), Yc(f, b, c, d, e(a)), a.options.lineWrapping || (f.iter(l, h.line + b.text.length, function (a) {
var b = k(f, a);
b > g.maxLineLength && (g.maxLine = a, g.maxLineLength = b, g.maxLineChanged = !0, j = !1)
}), j && (a.curOp.updateMaxLine = !0)), f.frontier = Math.min(f.frontier, h.line), F(a, 400);
var m = b.text.length - (i.line - h.line) - 1;
if (ab(a, h.line, i.line + 1, m), Fd(a, "change")) {
var n = {
from: h,
to: i,
text: b.text,
origin: b.origin
};
if (a.curOp.textChanged) {
for (var o = a.curOp.textChanged; o.next; o = o.next);
o.next = n
} else a.curOp.textChanged = n
}
}

function Kb(a, b, c, d, e) {
if (d || (d = c), Nb(d, c)) {
var f = d;
d = c, c = f
}
"string" == typeof b && (b = lf(b)), Eb(a, {
from: c,
to: d,
text: b,
origin: e
}, null)
}

function Lb(a, b) {
return this instanceof Lb ? (this.line = a, this.ch = b, void 0) : new Lb(a, b)
}

function Mb(a, b) {
return a.line == b.line && a.ch == b.ch
}

function Nb(a, b) {
return a.line < b.line || a.line == b.line && a.ch < b.ch
}

function Ob(a) {
return Lb(a.line, a.ch)
}

function Pb(a, b) {
return Math.max(a.first, Math.min(b, a.first + a.size - 1))
}

function Qb(a, b) {
if (b.line < a.first) return Lb(a.first, 0);
var c = a.first + a.size - 1;
return b.line > c ? Lb(c, bd(a, c).text.length) : Rb(b, bd(a, b.line).text.length)
}

function Rb(a, b) {
var c = a.ch;
return null == c || c > b ? Lb(a.line, b) : 0 > c ? Lb(a.line, 0) : a
}

function Sb(a, b) {
return b >= a.first && b < a.first + a.size
}

function Tb(a, b, c, d) {
if (a.sel.shift || a.sel.extend) {
var e = a.sel.anchor;
if (c) {
var f = Nb(b, e);
f != Nb(c, e) ? (e = b, b = c) : f != Nb(b, c) && (b = c)
}
Vb(a, e, b, d)
} else Vb(a, b, c || b, d);
a.cm && (a.cm.curOp.userSelChange = !0)
}

function Ub(a, b, c) {
var d = {
anchor: b,
head: c
};
return Cd(a, "beforeSelectionChange", a, d), a.cm && Cd(a.cm, "beforeSelectionChange", a.cm, d), d.anchor = Qb(a, d.anchor), d.head = Qb(a, d.head), d
}

function Vb(a, b, c, d, e) {
if (!e && Fd(a, "beforeSelectionChange") || a.cm && Fd(a.cm, "beforeSelectionChange")) {
var f = Ub(a, b, c);
c = f.head, b = f.anchor
}
var g = a.sel;
if (g.goalColumn = null, (e || !Mb(b, g.anchor)) && (b = Xb(a, b, d, "push" != e)), (e || !Mb(c, g.head)) && (c = Xb(a, c, d, "push" != e)), !Mb(g.anchor, b) || !Mb(g.head, c)) {
g.anchor = b, g.head = c;
var h = Nb(c, b);
g.from = h ? c : b, g.to = h ? b : c, a.cm && (a.cm.curOp.updateInput = a.cm.curOp.selectionChanged = !0), Dd(a, "cursorActivity", a)
}
}

function Wb(a) {
Vb(a.doc, a.doc.sel.from, a.doc.sel.to, null, "push")
}

function Xb(a, b, c, d) {
var e = !1,
f = b,
g = c || 1;
a.cantEdit = !1;
a: for (;;) {
var h, i = bd(a, f.line);
if (i.markedSpans) {
for (var j = 0; j < i.markedSpans.length; ++j) {
var k = i.markedSpans[j],
l = k.marker;
if ((null == k.from || (l.inclusiveLeft ? k.from <= f.ch : k.from < f.ch)) && (null == k.to || (l.inclusiveRight ? k.to >= f.ch : k.to > f.ch))) {
if (d && l.clearOnEnter) {
(h || (h = [])).push(l);
continue
}
if (!l.atomic) continue;
var m = l.find()[0 > g ? "from" : "to"];
if (Mb(m, f) && (m.ch += g, m.ch < 0 ? m = m.line > a.first ? Qb(a, Lb(m.line - 1)) : null : m.ch > i.text.length && (m = m.line < a.first + a.size - 1 ? Lb(m.line + 1, 0) : null), !m)) {
if (e) return d ? (a.cantEdit = !0, Lb(a.first, 0)) : Xb(a, b, c, !0);
e = !0, m = b, g = -g
}
f = m;
continue a
}
}
if (h)
for (var j = 0; j < h.length; ++j) h[j].clear()
}
return f
}
}

function Yb(a) {
var b = Zb(a, a.doc.sel.head);
if (a.state.focused) {
var c = a.display,
d = Wd(c.sizer),
e = null;
if (b.top + d.top < 0 ? e = !0 : b.bottom + d.top > (window.innerHeight || document.documentElement.clientHeight) && (e = !1), null != e && !se) {
var f = "none" == c.cursor.style.display;
f && (c.cursor.style.display = "", c.cursor.style.left = b.left + "px", c.cursor.style.top = b.top - c.viewOffset + "px"), c.cursor.scrollIntoView(e), f && (c.cursor.style.display = "none")
}
}
}

function Zb(a, b) {
for (;;) {
var c = !1,
d = R(a, b),
e = _b(a, d.left, d.top, d.left, d.bottom),
f = a.doc.scrollTop,
g = a.doc.scrollLeft;
if (null != e.scrollTop && (ob(a, e.scrollTop), Math.abs(a.doc.scrollTop - f) > 1 && (c = !0)), null != e.scrollLeft && (pb(a, e.scrollLeft), Math.abs(a.doc.scrollLeft - g) > 1 && (c = !0)), !c) return d
}
}

function $b(a, b, c, d, e) {
var f = _b(a, b, c, d, e);
null != f.scrollTop && ob(a, f.scrollTop), null != f.scrollLeft && pb(a, f.scrollLeft)
}

function _b(a, b, c, d, e) {
var f = a.display,
g = J(f);
c += g, e += g;
var h = f.scroller.clientHeight - bf,
i = f.scroller.scrollTop,
j = {}, k = a.doc.height + 2 * g,
l = g + 10 > c,
m = e + g > k - 10;
i > c ? j.scrollTop = l ? 0 : Math.max(0, c) : e > i + h && (j.scrollTop = (m ? k : e) - h);
var n = f.scroller.clientWidth - bf,
o = f.scroller.scrollLeft;
b += f.gutters.offsetWidth, d += f.gutters.offsetWidth;
var p = f.gutters.offsetWidth,
q = p + 10 > b;
return o + p > b || q ? (q && (b = 0), j.scrollLeft = Math.max(0, b - 10 - p)) : d > n + o - 3 && (j.scrollLeft = d + 10 - n), j
}

function ac(a, b, c, d) {
var e = a.doc;
if (c || (c = "add"), "smart" == c)
if (a.doc.mode.indent) var f = I(a, b);
else c = "prev";
var g, h = a.options.tabSize,
i = bd(e, b),
j = Hd(i.text, null, h),
k = i.text.match(/^\s*/)[0];
if ("smart" == c && (g = a.doc.mode.indent(f, i.text.slice(k.length), i.text), g == cf)) {
if (!d) return;
c = "prev"
}
"prev" == c ? g = b > e.first ? Hd(bd(e, b - 1).text, null, h) : 0 : "add" == c ? g = j + a.options.indentUnit : "subtract" == c && (g = j - a.options.indentUnit), g = Math.max(0, g);
var l = "",
m = 0;
if (a.options.indentWithTabs)
for (var n = Math.floor(g / h); n; --n) m += h, l += "	";
g > m && (l += Id(g - m)), l != k && Kb(a.doc, l, Lb(b, 0), Lb(b, k.length), "+input"), i.stateAfter = null
}

function bc(a, b, c) {
var d = b,
e = b,
f = a.doc;
return "number" == typeof b ? e = bd(f, Pb(f, b)) : d = fd(b), null == d ? null : c(e, d) ? (ab(a, d, d + 1), e) : null
}

function cc(a, b, c, d, e) {
function f() {
var b = h + c;
return b < a.first || b >= a.first + a.size ? k = !1 : (h = b, j = bd(a, b))
}

function g(a) {
var b = (e ? ee : fe)(j, i, c, !0);
if (null == b) {
if (a || !f()) return k = !1;
i = e ? (0 > c ? be : ae)(j) : 0 > c ? j.text.length : 0
} else i = b;
return !0
}
var h = b.line,
i = b.ch,
j = bd(a, h),
k = !0;
if ("char" == d) g();
else if ("column" == d) g(!0);
else if ("word" == d)
for (var l = !1; !(0 > c) || g();) {
if (Qd(j.text.charAt(i))) l = !0;
else if (l) {
0 > c && (c = 1, g());
break
}
if (c > 0 && !g()) break
}
var m = Xb(a, Lb(h, i), c, !0);
return k || (m.hitSide = !0), m
}

function dc(a, b, c, d) {
var e, f = a.doc,
g = b.left;
if ("page" == d) {
var h = Math.min(a.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
e = b.top + c * h
} else "line" == d && (e = c > 0 ? b.bottom + 3 : b.top - 3);
for (;;) {
var i = T(a, g, e);
if (!i.outside) break;
if (0 > c ? 0 >= e : e >= f.height) {
i.hitSide = !0;
break
}
e += 5 * c
}
return i
}

function ec(a, b) {
var c = b.ch,
d = b.ch;
if (a) {
b.after === !1 || d == a.length ? --c : ++d;
for (var e = a.charAt(c), f = Qd(e) ? Qd : /\s/.test(e) ? function (a) {
return /\s/.test(a)
} : function (a) {
return !/\s/.test(a) && !Qd(a)
}; c > 0 && f(a.charAt(c - 1));)--c;
for (; d < a.length && f(a.charAt(d));)++d
}
return {
from: Lb(b.line, c),
to: Lb(b.line, d)
}
}

function fc(a, b) {
Tb(a.doc, Lb(b, 0), Qb(a.doc, Lb(b + 1, 0)))
}

function gc(b, c, d, e) {
a.defaults[b] = c, d && (Le[b] = e ? function (a, b, c) {
c != Ne && d(a, b, c)
} : d)
}

function hc(a, b) {
if (b === !0) return b;
if (a.copyState) return a.copyState(b);
var c = {};
for (var d in b) {
var e = b[d];
e instanceof Array && (e = e.concat([])), c[d] = e
}
return c
}

function ic(a, b, c) {
return a.startState ? a.startState(b, c) : !0
}

function jc(a) {
return "string" == typeof a ? Te[a] : a
}

function kc(a, b, c) {
function d(b) {
b = jc(b);
var e = b[a];
if (e === !1) return "stop";
if (null != e && c(e)) return !0;
if (b.nofallthrough) return "stop";
var f = b.fallthrough;
if (null == f) return !1;
if ("[object Array]" != Object.prototype.toString.call(f)) return d(f);
for (var g = 0, h = f.length; h > g; ++g) {
var i = d(f[g]);
if (i) return i
}
return !1
}
for (var e = 0; e < b.length; ++e) {
var f = d(b[e]);
if (f) return f
}
}

function lc(a) {
var b = of[a.keyCode];
return "Ctrl" == b || "Alt" == b || "Shift" == b || "Mod" == b
}

function mc(a, b) {
var c = of[a.keyCode];
return null == c || a.altGraphKey ? !1 : (a.altKey && (c = "Alt-" + c), (Be ? a.metaKey : a.ctrlKey) && (c = "Ctrl-" + c), (Be ? a.ctrlKey : a.metaKey) && (c = "Cmd-" + c), !b && a.shiftKey && (c = "Shift-" + c), c)
}

function nc(a, b) {
this.pos = this.start = 0, this.string = a, this.tabSize = b || 8
}

function oc(a, b) {
this.lines = [], this.type = b, this.doc = a
}

function pc(a, b, c, d, e) {
if (d && d.shared) return rc(a, b, c, d, e);
if (a.cm && !a.cm.curOp) return Z(a.cm, pc)(a, b, c, d, e);
var f = new oc(a, e);
if ("range" == e && !Nb(b, c)) return f;
d && Nd(d, f), f.replacedWith && (f.collapsed = !0, f.replacedWith = Sd("span", [f.replacedWith], "CodeMirror-widget")), f.collapsed && (Ee = !0);
var g, h, i, j = b.line,
k = 0,
l = a.cm;
if (a.iter(j, c.line + 1, function (d) {
l && f.collapsed && !l.options.lineWrapping && Dc(a, d) == l.display.maxLine && (i = !0);
var e = {
from: null,
to: null,
marker: f
};
k += d.text.length, j == b.line && (e.from = b.ch, k -= b.ch), j == c.line && (e.to = c.ch, k -= d.text.length - c.ch), f.collapsed && (j == c.line && (h = Ac(d, c.ch)), j == b.line ? g = Ac(d, b.ch) : ed(d, 0)), uc(d, e), ++j
}), f.collapsed && a.iter(b.line, c.line + 1, function (b) {
Ec(a, b) && ed(b, 0)
}), f.readOnly && (De = !0, (a.history.done.length || a.history.undone.length) && a.clearHistory()), f.collapsed) {
if (g != h) throw new Error("Inserting collapsed marker overlapping an existing one");
f.size = k, f.atomic = !0
}
return l && (i && (l.curOp.updateMaxLine = !0), (f.className || f.startStyle || f.endStyle || f.collapsed) && ab(l, b.line, c.line + 1), f.atomic && Wb(l)), f
}

function qc(a, b) {
this.markers = a, this.primary = b;
for (var c = 0, d = this; c < a.length; ++c) a[c].parent = this, Ad(a[c], "clear", function () {
d.clear()
})
}

function rc(a, b, c, d, e) {
d = Nd(d), d.shared = !1;
var f = [pc(a, b, c, d, e)],
g = f[0];
return _c(a, function (a) {
f.push(pc(a, Qb(a, b), Qb(a, c), d, e));
for (var h = 0; h < a.linked.length; ++h)
if (a.linked[h].isParent) return;
g = Jd(f)
}), new qc(f, g)
}

function sc(a, b) {
if (a)
for (var c = 0; c < a.length; ++c) {
var d = a[c];
if (d.marker == b) return d
}
}

function tc(a, b) {
for (var c, d = 0; d < a.length; ++d) a[d] != b && (c || (c = [])).push(a[d]);
return c
}

function uc(a, b) {
a.markedSpans = a.markedSpans ? a.markedSpans.concat([b]) : [b], b.marker.attachLine(a)
}

function vc(a, b, c) {
if (a)
for (var d, e = 0; e < a.length; ++e) {
var f = a[e],
g = f.marker,
h = null == f.from || (g.inclusiveLeft ? f.from <= b : f.from < b);
if (h || "bookmark" == g.type && f.from == b && (!c || !f.marker.insertLeft)) {
var i = null == f.to || (g.inclusiveRight ? f.to >= b : f.to > b);
(d || (d = [])).push({
from: f.from,
to: i ? null : f.to,
marker: g
})
}
}
return d
}

function wc(a, b, c) {
if (a)
for (var d, e = 0; e < a.length; ++e) {
var f = a[e],
g = f.marker,
h = null == f.to || (g.inclusiveRight ? f.to >= b : f.to > b);
if (h || "bookmark" == g.type && f.from == b && (!c || f.marker.insertLeft)) {
var i = null == f.from || (g.inclusiveLeft ? f.from <= b : f.from < b);
(d || (d = [])).push({
from: i ? null : f.from - b,
to: null == f.to ? null : f.to - b,
marker: g
})
}
}
return d
}

function xc(a, b) {
var c = Sb(a, b.from.line) && bd(a, b.from.line).markedSpans,
d = Sb(a, b.to.line) && bd(a, b.to.line).markedSpans;
if (!c && !d) return null;
var e = b.from.ch,
f = b.to.ch,
g = Mb(b.from, b.to),
h = vc(c, e, g),
i = wc(d, f, g),
j = 1 == b.text.length,
k = Jd(b.text).length + (j ? e : 0);
if (h)
for (var l = 0; l < h.length; ++l) {
var m = h[l];
if (null == m.to) {
var n = sc(i, m.marker);
n ? j && (m.to = null == n.to ? null : n.to + k) : m.to = e
}
}
if (i)
for (var l = 0; l < i.length; ++l) {
var m = i[l];
if (null != m.to && (m.to += k), null == m.from) {
var n = sc(h, m.marker);
n || (m.from = k, j && (h || (h = [])).push(m))
} else m.from += k, j && (h || (h = [])).push(m)
}
var o = [h];
if (!j) {
var p, q = b.text.length - 2;
if (q > 0 && h)
for (var l = 0; l < h.length; ++l) null == h[l].to && (p || (p = [])).push({
from: null,
to: null,
marker: h[l].marker
});
for (var l = 0; q > l; ++l) o.push(p);
o.push(i)
}
return o
}

function yc(a, b) {
var c = od(a, b),
d = xc(a, b);
if (!c) return d;
if (!d) return c;
for (var e = 0; e < c.length; ++e) {
var f = c[e],
g = d[e];
if (f && g) a: for (var h = 0; h < g.length; ++h) {
for (var i = g[h], j = 0; j < f.length; ++j)
if (f[j].marker == i.marker) continue a;
f.push(i)
} else g && (c[e] = g)
}
return c
}

function zc(a, b, c) {
var d = null;
if (a.iter(b.line, c.line + 1, function (a) {
if (a.markedSpans)
for (var b = 0; b < a.markedSpans.length; ++b) {
var c = a.markedSpans[b].marker;
!c.readOnly || d && -1 != Ld(d, c) || (d || (d = [])).push(c)
}
}), !d) return null;
for (var e = [{
from: b,
to: c
}], f = 0; f < d.length; ++f)
for (var g = d[f], h = g.find(), i = 0; i < e.length; ++i) {
var j = e[i];
if (!Nb(j.to, h.from) && !Nb(h.to, j.from)) {
var k = [i, 1];
(Nb(j.from, h.from) || !g.inclusiveLeft && Mb(j.from, h.from)) && k.push({
from: j.from,
to: h.from
}), (Nb(h.to, j.to) || !g.inclusiveRight && Mb(j.to, h.to)) && k.push({
from: h.to,
to: j.to
}), e.splice.apply(e, k), i += k.length - 1
}
}
return e
}

function Ac(a, b) {
var c, d = Ee && a.markedSpans;
if (d)
for (var e, f = 0; f < d.length; ++f) e = d[f], e.marker.collapsed && (null == e.from || e.from < b) && (null == e.to || e.to > b) && (!c || c.width < e.marker.width) && (c = e.marker);
return c
}

function Bc(a) {
return Ac(a, -1)
}

function Cc(a) {
return Ac(a, a.text.length + 1)
}

function Dc(a, b) {
for (var c; c = Bc(b);) b = bd(a, c.find().from.line);
return b
}

function Ec(a, b) {
var c = Ee && b.markedSpans;
if (c)
for (var d, e = 0; e < c.length; ++e)
if (d = c[e], d.marker.collapsed) {
if (null == d.from) return !0;
if (0 == d.from && d.marker.inclusiveLeft && Fc(a, b, d)) return !0
}
}

function Fc(a, b, c) {
if (null == c.to) {
var d = c.marker.find().to,
e = bd(a, d.line);
return Fc(a, e, sc(e.markedSpans, c.marker))
}
if (c.marker.inclusiveRight && c.to == b.text.length) return !0;
for (var f, g = 0; g < b.markedSpans.length; ++g)
if (f = b.markedSpans[g], f.marker.collapsed && f.from == c.to && (f.marker.inclusiveLeft || c.marker.inclusiveRight) && Fc(a, b, f)) return !0
}

function Gc(a) {
var b = a.markedSpans;
if (b) {
for (var c = 0; c < b.length; ++c) b[c].marker.detachLine(a);
a.markedSpans = null
}
}

function Hc(a, b) {
if (b) {
for (var c = 0; c < b.length; ++c) b[c].marker.attachLine(a);
a.markedSpans = b
}
}

function Ic(a) {
return function () {
var b = !this.cm.curOp;
b && X(this.cm);
try {
var c = a.apply(this, arguments)
} finally {
b && Y(this.cm)
}
return c
}
}

function Jc(a) {
return null != a.height ? a.height : (a.node.parentNode && 1 == a.node.parentNode.nodeType || Ud(a.cm.display.measure, Sd("div", [a.node], null, "position: relative")), a.height = a.node.offsetHeight)
}

function Kc(a, b, c, d) {
var e = new Ue(a, c, d);
return e.noHScroll && (a.display.alignWidgets = !0), bc(a, b, function (b) {
if ((b.widgets || (b.widgets = [])).push(e), e.line = b, !Ec(a.doc, b) || e.showIfHidden) {
var c = hd(a, b) < a.display.scroller.scrollTop;
ed(b, b.height + Jc(e)), c && (a.curOp.updateScrollPos = {
scrollTop: a.doc.scrollTop + e.height,
scrollLeft: a.doc.scrollLeft
})
}
return !0
}), e
}

function Lc(a, b, c) {
var d = {
text: a
};
return Hc(d, b), d.height = c ? c(d) : 1, d
}

function Mc(a, b, c, d) {
a.text = b, a.stateAfter && (a.stateAfter = null), a.styles && (a.styles = null), null != a.order && (a.order = null), Gc(a), Hc(a, c);
var e = d ? d(a) : 1;
e != a.height && ed(a, e), Dd(a, "change")
}

function Nc(a) {
a.parent = null, Gc(a)
}

function Oc(a, b, c, d, e) {
var f = a.options.flattenSpans,
g = "",
h = null,
i = new nc(b, a.options.tabSize);
for ("" == b && c.blankLine && c.blankLine(d); !i.eol();) {
var j = c.token(i, d);
i.pos > 5e3 && (f = !1, i.pos = Math.min(b.length, i.start + 5e4), j = null);
var k = i.current();
i.start = i.pos, f && h == j ? g += k : (g && e(g, h), g = k, h = j)
}
g && e(g, h)
}

function Pc(a, b, c) {
var d = [a.state.modeGen];
Oc(a, b.text, a.doc.mode, c, function (a, b) {
d.push(a, b)
});
for (var e = 0; e < a.state.overlays.length; ++e) {
var f = a.state.overlays[e],
g = 1;
Oc(a, b.text, f.mode, !0, function (a, b) {
for (var c = g, e = a.length; e;) {
var h = d[g],
i = h.length;
e >= i ? e -= i : (d.splice(g, 1, h.slice(0, e), d[g + 1], h.slice(e)), e = 0), g += 2
}
if (b)
if (f.opaque) d.splice(c, g - c, a, b), g = c + 2;
else
for (; g > c; c += 2) {
var h = d[c + 1];
d[c + 1] = h ? h + " " + b : b
}
})
}
return d
}

function Qc(a, b) {
return b.styles && b.styles[0] == a.state.modeGen || (b.styles = Pc(a, b, b.stateAfter = I(a, fd(b)))), b.styles
}

function Rc(a, b, c) {
var d = a.doc.mode,
e = new nc(b.text, a.options.tabSize);
for ("" == b.text && d.blankLine && d.blankLine(c); !e.eol() && e.pos <= 5e3;) d.token(e, c), e.start = e.pos
}

function Sc(a) {
return a ? Ve[a] || (Ve[a] = "cm-" + a.replace(/ +/g, " cm-")) : null
}

function Tc(a, b, c) {
for (var d, e, f, g = b, h = !0; d = Bc(g);) h = !1, g = bd(a.doc, d.find().from.line), e || (e = g);
var i = {
pre: Sd("pre"),
col: 0,
pos: 0,
display: !c,
measure: null,
addedOne: !1,
cm: a
};
g.textClass && (i.pre.className = g.textClass);
do {
i.measure = g == b && c, i.pos = 0, i.addToken = i.measure ? Vc : Uc, c && f && g != b && !i.addedOne && (c[0] = i.pre.appendChild(Yd(a.display.measure)), i.addedOne = !0);
var j = Xc(g, i, Qc(a, g));
f = g == e, j && (g = bd(a.doc, j.to.line), h = !1)
} while (j);
c && !i.addedOne && (c[0] = i.pre.appendChild(h ? Sd("span", " ") : Yd(a.display.measure))), i.pre.firstChild || Ec(a.doc, b) || i.pre.appendChild(document.createTextNode(" "));
var k;
if (c && he && (k = id(g))) {
var l = k.length - 1;
k[l].from == k[l].to && --l;
var m = k[l],
n = k[l - 1];
if (m.from + 1 == m.to && n && m.level < n.level) {
var o = c[i.pos - 1];
o && o.parentNode.insertBefore(o.measureRight = Yd(a.display.measure), o.nextSibling)
}
}
return i.pre
}

function Uc(a, b, c, d, e) {
if (b) {
if (We.test(b))
for (var f = document.createDocumentFragment(), g = 0;;) {
We.lastIndex = g;
var h = We.exec(b),
i = h ? h.index - g : b.length - g;
if (i && (f.appendChild(document.createTextNode(b.slice(g, g + i))), a.col += i), !h) break;
if (g += i + 1, "	" == h[0]) {
var j = a.cm.options.tabSize,
k = j - a.col % j;
f.appendChild(Sd("span", Id(k), "cm-tab")), a.col += k
} else {
var l = Sd("span", "•", "cm-invalidchar");
l.title = "\\u" + h[0].charCodeAt(0).toString(16), f.appendChild(l), a.col += 1
}
} else {
a.col += b.length;
var f = document.createTextNode(b)
} if (c || d || e || a.measure) {
var m = c || "";
return d && (m += d), e && (m += e), a.pre.appendChild(Sd("span", [f], m))
}
a.pre.appendChild(f)
}
}

function Vc(a, b, c, d, e) {
for (var f = 0; f < b.length; ++f) {
var g = b.charAt(f),
h = 0 == f;
g >= "���" && "���" > g && f < b.length - 1 ? (g = b.slice(f, f + 2), ++f) : f && a.cm.options.lineWrapping && hf.test(b.slice(f - 1, f + 1)) && a.pre.appendChild(Sd("wbr")), a.measure[a.pos] = Uc(a, g, c, h && d, f == b.length - 1 && e), a.pos += g.length
}
b.length && (a.addedOne = !0)
}

function Wc(a, b, c) {
c && (a.display || (c = c.cloneNode(!0)), a.pre.appendChild(c), a.measure && b && (a.measure[a.pos] = c, a.addedOne = !0)), a.pos += b
}

function Xc(a, b, c) {
var d = a.markedSpans;
if (d)
for (var e, f, g, h, i, j = a.text, k = j.length, l = 0, m = 1, n = "", o = 0;;) {
if (o == l) {
f = g = h = "", i = null, o = 1 / 0;
for (var p = null, q = 0; q < d.length; ++q) {
var r = d[q],
s = r.marker;
r.from <= l && (null == r.to || r.to > l) ? (null != r.to && o > r.to && (o = r.to, g = ""), s.className && (f += " " + s.className), s.startStyle && r.from == l && (h += " " + s.startStyle), s.endStyle && r.to == o && (g += " " + s.endStyle), s.collapsed && (!i || i.marker.width < s.width) && (i = r)) : r.from > l && o > r.from && (o = r.from), "bookmark" == s.type && r.from == l && s.replacedWith && (p = s.replacedWith)
}
if (i && (i.from || 0) == l && (Wc(b, (null == i.to ? k : i.to) - l, null != i.from && i.marker.replacedWith), null == i.to)) return i.marker.find();
p && !i && Wc(b, 0, p)
}
if (l >= k) break;
for (var t = Math.min(k, o);;) {
if (n) {
var u = l + n.length;
if (!i) {
var v = u > t ? n.slice(0, t - l) : n;
b.addToken(b, v, e ? e + f : f, h, l + v.length == o ? g : "")
}
if (u >= t) {
n = n.slice(t - l), l = t;
break
}
l = u, h = ""
}
n = c[m++], e = Sc(c[m++])
}
} else
for (var m = 1; m < c.length; m += 2) b.addToken(b, c[m], Sc(c[m + 1]))
}

function Yc(a, b, c, d, e) {
function f(a) {
return c ? c[a] : null
}
var g = b.from,
h = b.to,
i = b.text,
j = bd(a, g.line),
k = bd(a, h.line),
l = Jd(i),
m = f(i.length - 1),
n = h.line - g.line;
if (0 == g.ch && 0 == h.ch && "" == l) {
for (var o = 0, p = i.length - 1, q = []; p > o; ++o) q.push(Lc(i[o], f(o), e));
Mc(k, k.text, m, e), n && a.remove(g.line, n), q.length && a.insert(g.line, q)
} else if (j == k)
if (1 == i.length) Mc(j, j.text.slice(0, g.ch) + l + j.text.slice(h.ch), m, e);
else {
for (var q = [], o = 1, p = i.length - 1; p > o; ++o) q.push(Lc(i[o], f(o), e));
q.push(Lc(l + j.text.slice(h.ch), m, e)), Mc(j, j.text.slice(0, g.ch) + i[0], f(0), e), a.insert(g.line + 1, q)
} else if (1 == i.length) Mc(j, j.text.slice(0, g.ch) + i[0] + k.text.slice(h.ch), f(0), e), a.remove(g.line + 1, n);
else {
Mc(j, j.text.slice(0, g.ch) + i[0], f(0), e), Mc(k, l + k.text.slice(h.ch), m, e);
for (var o = 1, p = i.length - 1, q = []; p > o; ++o) q.push(Lc(i[o], f(o), e));
n > 1 && a.remove(g.line + 1, n - 1), a.insert(g.line + 1, q)
}
Dd(a, "change", a, b), Vb(a, d.anchor, d.head, null, !0)
}

function Zc(a) {
this.lines = a, this.parent = null;
for (var b = 0, c = a.length, d = 0; c > b; ++b) a[b].parent = this, d += a[b].height;
this.height = d
}

function $c(a) {
this.children = a;
for (var b = 0, c = 0, d = 0, e = a.length; e > d; ++d) {
var f = a[d];
b += f.chunkSize(), c += f.height, f.parent = this
}
this.size = b, this.height = c, this.parent = null
}

function _c(a, b, c) {
function d(a, e, f) {
if (a.linked)
for (var g = 0; g < a.linked.length; ++g) {
var h = a.linked[g];
if (h.doc != e) {
var i = f && h.sharedHist;
(!c || i) && (b(h.doc, i), d(h.doc, a, i))
}
}
}
d(a, null, !0)
}

function ad(a, b) {
if (b.cm) throw new Error("This document is already in use.");
a.doc = b, b.cm = a, f(a), c(a), a.options.lineWrapping || l(a), a.options.mode = b.modeOption, ab(a)
}

function bd(a, b) {
for (b -= a.first; !a.lines;)
for (var c = 0;; ++c) {
var d = a.children[c],
e = d.chunkSize();
if (e > b) {
a = d;
break
}
b -= e
}
return a.lines[b]
}

function cd(a, b, c) {
var d = [],
e = b.line;
return a.iter(b.line, c.line + 1, function (a) {
var f = a.text;
e == c.line && (f = f.slice(0, c.ch)), e == b.line && (f = f.slice(b.ch)), d.push(f), ++e
}), d
}

function dd(a, b, c) {
var d = [];
return a.iter(b, c, function (a) {
d.push(a.text)
}), d
}

function ed(a, b) {
for (var c = b - a.height, d = a; d; d = d.parent) d.height += c
}

function fd(a) {
if (null == a.parent) return null;
for (var b = a.parent, c = Ld(b.lines, a), d = b.parent; d; b = d, d = d.parent)
for (var e = 0; d.children[e] != b; ++e) c += d.children[e].chunkSize();
return c + b.first
}

function gd(a, b) {
var c = a.first;
a: do {
for (var d = 0, e = a.children.length; e > d; ++d) {
var f = a.children[d],
g = f.height;
if (g > b) {
a = f;
continue a
}
b -= g, c += f.chunkSize()
}
return c
} while (!a.lines);
for (var d = 0, e = a.lines.length; e > d; ++d) {
var h = a.lines[d],
i = h.height;
if (i > b) break;
b -= i
}
return c + d
}

function hd(a, b) {
b = Dc(a.doc, b);
for (var c = 0, d = b.parent, e = 0; e < d.lines.length; ++e) {
var f = d.lines[e];
if (f == b) break;
c += f.height
}
for (var g = d.parent; g; d = g, g = d.parent)
for (var e = 0; e < g.children.length; ++e) {
var h = g.children[e];
if (h == d) break;
c += h.height
}
return c
}

function id(a) {
var b = a.order;
return null == b && (b = a.order = pf(a.text)), b
}

function jd() {
return {
done: [],
undone: [],
undoDepth: 1 / 0,
lastTime: 0,
lastOp: null,
lastOrigin: null,
dirtyCounter: 0
}
}

function kd(a, b, c, d) {
var e = b["spans_" + a.id],
f = 0;
a.iter(Math.max(a.first, c), Math.min(a.first + a.size, d), function (c) {
c.markedSpans && ((e || (e = b["spans_" + a.id] = {}))[f] = c.markedSpans), ++f
})
}

function ld(a, b) {
var c = {
from: b.from,
to: Ab(b),
text: cd(a, b.from, b.to)
};
return kd(a, c, b.from.line, b.to.line + 1), _c(a, function (a) {
kd(a, c, b.from.line, b.to.line + 1)
}, !0), c
}

function md(a, b, c, d) {
var e = a.history;
e.undone.length = 0;
var f = +new Date,
g = Jd(e.done);
if (g && (e.lastOp == d || e.lastOrigin == b.origin && b.origin && ("+" == b.origin.charAt(0) && e.lastTime > f - 600 || "*" == b.origin.charAt(0)))) {
var h = Jd(g.changes);
Mb(b.from, b.to) && Mb(b.from, h.to) ? h.to = Ab(b) : g.changes.push(ld(a, b)), g.anchorAfter = c.anchor, g.headAfter = c.head
} else {
for (g = {
changes: [ld(a, b)],
anchorBefore: a.sel.anchor,
headBefore: a.sel.head,
anchorAfter: c.anchor,
headAfter: c.head
}, e.done.push(g); e.done.length > e.undoDepth;) e.done.shift();
e.dirtyCounter < 0 ? e.dirtyCounter = 0 / 0 : e.dirtyCounter++
}
e.lastTime = f, e.lastOp = d, e.lastOrigin = b.origin
}

function nd(a) {
if (!a) return null;
for (var b, c = 0; c < a.length; ++c) a[c].marker.explicitlyCleared ? b || (b = a.slice(0, c)) : b && b.push(a[c]);
return b ? b.length ? b : null : a
}

function od(a, b) {
var c = b["spans_" + a.id];
if (!c) return null;
for (var d = 0, e = []; d < b.text.length; ++d) e.push(nd(c[d]));
return e
}

function pd(a, b) {
for (var c = 0, d = []; c < a.length; ++c) {
var e = a[c],
f = e.changes,
g = [];
d.push({
changes: g,
anchorBefore: e.anchorBefore,
headBefore: e.headBefore,
anchorAfter: e.anchorAfter,
headAfter: e.headAfter
});
for (var h = 0; h < f.length; ++h) {
var i, j = f[h];
if (g.push({
from: j.from,
to: j.to,
text: j.text
}), b)
for (var k in j)(i = k.match(/^spans_(\d+)$/)) && Ld(b, Number(i[1])) > -1 && (Jd(g)[k] = j[k], delete j[k])
}
}
return d
}

function qd(a, b, c, d) {
c < a.line ? a.line += d : b < a.line && (a.line = b, a.ch = 0)
}

function rd(a, b, c, d) {
for (var e = 0; e < a.length; ++e) {
for (var f = a[e], g = !0, h = 0; h < f.changes.length; ++h) {
var i = f.changes[h];
if (f.copied || (i.from = Ob(i.from), i.to = Ob(i.to)), c < i.from.line) i.from.line += d, i.to.line += d;
else if (b <= i.to.line) {
g = !1;
break
}
}
f.copied || (f.anchorBefore = Ob(f.anchorBefore), f.headBefore = Ob(f.headBefore), f.anchorAfter = Ob(f.anchorAfter), f.readAfter = Ob(f.headAfter), f.copied = !0), g ? (qd(f.anchorBefore), qd(f.headBefore), qd(f.anchorAfter), qd(f.headAfter)) : (a.splice(0, e + 1), e = 0)
}
}

function sd(a, b) {
var c = b.from.line,
d = b.to.line,
e = b.text.length - (d - c) - 1;
rd(a.done, c, d, e), rd(a.undone, c, d, e)
}

function td() {
xd(this)
}

function ud(a) {
return a.stop || (a.stop = td), a
}

function vd(a) {
a.preventDefault ? a.preventDefault() : a.returnValue = !1
}

function wd(a) {
a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0
}

function xd(a) {
vd(a), wd(a)
}

function yd(a) {
return a.target || a.srcElement
}

function zd(a) {
var b = a.which;
return null == b && (1 & a.button ? b = 1 : 2 & a.button ? b = 3 : 4 & a.button && (b = 2)), ve && a.ctrlKey && 1 == b && (b = 3), b
}

function Ad(a, b, c) {
if (a.addEventListener) a.addEventListener(b, c, !1);
else if (a.attachEvent) a.attachEvent("on" + b, c);
else {
var d = a._handlers || (a._handlers = {}),
e = d[b] || (d[b] = []);
e.push(c)
}
}

function Bd(a, b, c) {
if (a.removeEventListener) a.removeEventListener(b, c, !1);
else if (a.detachEvent) a.detachEvent("on" + b, c);
else {
var d = a._handlers && a._handlers[b];
if (!d) return;
for (var e = 0; e < d.length; ++e)
if (d[e] == c) {
d.splice(e, 1);
break
}
}
}

function Cd(a, b) {
var c = a._handlers && a._handlers[b];
if (c)
for (var d = Array.prototype.slice.call(arguments, 2), e = 0; e < c.length; ++e) c[e].apply(null, d)
}

function Dd(a, b) {
function c(a) {
return function () {
a.apply(null, e)
}
}
var d = a._handlers && a._handlers[b];
if (d) {
var e = Array.prototype.slice.call(arguments, 2);
_e || (++af, _e = [], setTimeout(Ed, 0));
for (var f = 0; f < d.length; ++f) _e.push(c(d[f]))
}
}

function Ed() {
--af;
var a = _e;
_e = null;
for (var b = 0; b < a.length; ++b) a[b]()
}

function Fd(a, b) {
var c = a._handlers && a._handlers[b];
return c && c.length > 0
}

function Gd() {
this.id = null
}

function Hd(a, b, c) {
null == b && (b = a.search(/[^\s\u00a0]/), -1 == b && (b = a.length));
for (var d = 0, e = 0; b > d; ++d) "	" == a.charAt(d) ? e += c - e % c : ++e;
return e
}

function Id(a) {
for (; df.length <= a;) df.push(Jd(df) + " ");
return df[a]
}

function Jd(a) {
return a[a.length - 1]
}

function Kd(a) {
te ? (a.selectionStart = 0, a.selectionEnd = a.value.length) : a.select()
}

function Ld(a, b) {
if (a.indexOf) return a.indexOf(b);
for (var c = 0, d = a.length; d > c; ++c)
if (a[c] == b) return c;
return -1
}

function Md(a, b) {
function c() {}
c.prototype = a;
var d = new c;
return b && Nd(b, d), d
}

function Nd(a, b) {
b || (b = {});
for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c]);
return b
}

function Od(a) {
for (var b = [], c = 0; a > c; ++c) b.push(void 0);
return b
}

function Pd(a) {
var b = Array.prototype.slice.call(arguments, 1);
return function () {
return a.apply(null, b)
}
}

function Qd(a) {
return /\w/.test(a) || a > "" && (a.toUpperCase() != a.toLowerCase() || ef.test(a))
}

function Rd(a) {
for (var b in a)
if (a.hasOwnProperty(b) && a[b]) return !1;
return !0
}

function Sd(a, b, c, d) {
var e = document.createElement(a);
if (c && (e.className = c), d && (e.style.cssText = d), "string" == typeof b) Vd(e, b);
else if (b)
for (var f = 0; f < b.length; ++f) e.appendChild(b[f]);
return e
}

function Td(a) {
if (he)
for (; a.firstChild;) a.removeChild(a.firstChild);
else a.innerHTML = "";
return a
}

function Ud(a, b) {
return Td(a).appendChild(b)
}

function Vd(a, b) {
je ? (a.innerHTML = "", a.appendChild(document.createTextNode(b))) : a.textContent = b
}

function Wd(a) {
return a.getBoundingClientRect()
}

function Xd(a) {
if (null != jf) return jf;
var b = Sd("div", null, null, "width: 50px; height: 50px; overflow-x: scroll");
return Ud(a, b), b.offsetWidth && (jf = b.offsetHeight - b.clientHeight), jf || 0
}

function Yd(a) {
if (null == kf) {
var b = Sd("span", "​");
Ud(a, Sd("span", [b, document.createTextNode("x")])), 0 != a.firstChild.offsetHeight && (kf = b.offsetWidth <= 1 && b.offsetHeight > 2 && !ie)
}
return kf ? Sd("span", "​") : Sd("span", " ", null, "display: inline-block; width: 1px; margin-right: -1px")
}

function Zd(a, b, c, d) {
if (!a) return d(b, c, "ltr");
for (var e = 0; e < a.length; ++e) {
var f = a[e];
(f.from < c && f.to > b || b == c && f.to == b) && d(Math.max(f.from, b), Math.min(f.to, c), 1 == f.level ? "rtl" : "ltr")
}
}

function $d(a) {
return a.level % 2 ? a.to : a.from
}

function _d(a) {
return a.level % 2 ? a.from : a.to
}

function ae(a) {
var b = id(a);
return b ? $d(b[0]) : 0
}

function be(a) {
var b = id(a);
return b ? _d(Jd(b)) : a.text.length
}

function ce(a, b) {
var c = bd(a.doc, b),
d = Dc(a.doc, c);
d != c && (b = fd(d));
var e = id(d),
f = e ? e[0].level % 2 ? be(d) : ae(d) : 0;
return Lb(b, f)
}

function de(a, b) {
for (var c, d; c = Cc(d = bd(a.doc, b));) b = c.find().to.line;
var e = id(d),
f = e ? e[0].level % 2 ? ae(d) : be(d) : d.text.length;
return Lb(b, f)
}

function ee(a, b, c, d) {
var e = id(a);
if (!e) return fe(a, b, c, d);
for (var f = d ? function (b, c) {
do b += c; while (b > 0 && ff.test(a.text.charAt(b)));
return b
} : function (a, b) {
return a + b
}, g = e[0].level, h = 0; h < e.length; ++h) {
var i = e[h],
j = i.level % 2 == g;
if (i.from < b && i.to > b || j && (i.from == b || i.to == b)) break
}
for (var k = f(b, i.level % 2 ? -c : c); null != k;)
if (i.level % 2 == g) {
if (!(k < i.from || k > i.to)) break;
i = e[h += c], k = i && (c > 0 == i.level % 2 ? f(i.to, -1) : f(i.from, 1))
} else if (k == $d(i)) i = e[--h], k = i && _d(i);
else {
if (k != _d(i)) break;
i = e[++h], k = i && $d(i)
}
return 0 > k || k > a.text.length ? null : k
}

function fe(a, b, c, d) {
var e = b + c;
if (d)
for (; e > 0 && ff.test(a.text.charAt(e));) e += c;
return 0 > e || e > a.text.length ? null : e
}
var ge = /gecko\/\d/i.test(navigator.userAgent),
he = /MSIE \d/.test(navigator.userAgent),
ie = he && (null == document.documentMode || document.documentMode < 8),
je = he && (null == document.documentMode || document.documentMode < 9),
ke = /WebKit\//.test(navigator.userAgent),
le = ke && /Qt\/\d+\.\d+/.test(navigator.userAgent),
me = /Chrome\//.test(navigator.userAgent),
ne = /Opera\//.test(navigator.userAgent),
oe = /Apple Computer/.test(navigator.vendor),
pe = /KHTML\//.test(navigator.userAgent),
qe = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),
re = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),
se = /PhantomJS/.test(navigator.userAgent),
te = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent),
ue = te || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),
ve = te || /Mac/.test(navigator.platform),
we = /windows/i.test(navigator.platform),
xe = ne && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
xe && (xe = Number(xe[1]));
var ye, ze, Ae, Be = ve && (le || ne && (null == xe || 12.11 > xe)),
Ce = ge || he && !je,
De = !1,
Ee = !1,
Fe = 0,
Ge = 0,
He = null;
he ? He = -.53 : ge ? He = 15 : me ? He = -.7 : oe && (He = -1 / 3);
var Ie, Je, Ke = null;
a.Pos = Lb, a.prototype = {
focus: function () {
window.focus(), fb(this), xb(this), cb(this)
},
setOption: function (a, b) {
var c = this.options,
d = c[a];
(c[a] != b || "mode" == a) && (c[a] = b, Le.hasOwnProperty(a) && Z(this, Le[a])(this, b, d))
},
getOption: function (a) {
return this.options[a]
},
getDoc: function () {
return this.doc
},
addKeyMap: function (a) {
this.state.keyMaps.push(a)
},
removeKeyMap: function (a) {
for (var b = this.state.keyMaps, c = 0; c < b.length; ++c)
if (("string" == typeof a ? b[c].name : b[c]) == a) return b.splice(c, 1), !0
},
addOverlay: Z(null, function (b, c) {
var d = b.token ? b : a.getMode(this.options, b);
if (d.startState) throw new Error("Overlays may not be stateful.");
this.state.overlays.push({
mode: d,
modeSpec: b,
opaque: c && c.opaque
}), this.state.modeGen++, ab(this)
}),
removeOverlay: Z(null, function (a) {
for (var b = this.state.overlays, c = 0; c < b.length; ++c)
if (b[c].modeSpec == a) return b.splice(c, 1), this.state.modeGen++, ab(this), void 0
}),
indentLine: Z(null, function (a, b, c) {
"string" != typeof b && (b = null == b ? this.options.smartIndent ? "smart" : "prev" : b ? "add" : "subtract"), Sb(this.doc, a) && ac(this, a, b, c)
}),
indentSelection: Z(null, function (a) {
var b = this.doc.sel;
if (Mb(b.from, b.to)) return ac(this, b.from.line, a);
for (var c = b.to.line - (b.to.ch ? 0 : 1), d = b.from.line; c >= d; ++d) ac(this, d, a)
}),
getTokenAt: function (a) {
var b = this.doc;
a = Qb(b, a);
for (var c = I(this, a.line), d = this.doc.mode, e = bd(b, a.line), f = new nc(e.text, this.options.tabSize); f.pos < a.ch && !f.eol();) {
f.start = f.pos;
var g = d.token(f, c)
}
return {
start: f.start,
end: f.pos,
string: f.current(),
className: g || null,
type: g || null,
state: c
}
},
getStateAfter: function (a) {
var b = this.doc;
return a = Pb(b, null == a ? b.first + b.size - 1 : a), I(this, a + 1)
},
cursorCoords: function (a, b) {
var c, d = this.doc.sel;
return c = null == a ? d.head : "object" == typeof a ? Qb(this.doc, a) : a ? d.from : d.to, R(this, c, b || "page")
},
charCoords: function (a, b) {
return Q(this, Qb(this.doc, a), b || "page")
},
coordsChar: function (a) {
var b = Wd(this.display.lineSpace),
c = window.pageYOffset || (document.documentElement || document.body).scrollTop,
d = window.pageXOffset || (document.documentElement || document.body).scrollLeft;
return T(this, a.left - b.left - d, a.top - b.top - c)
},
defaultTextHeight: function () {
return V(this.display)
},
setGutterMarker: Z(null, function (a, b, c) {
return bc(this, a, function (a) {
var d = a.gutterMarkers || (a.gutterMarkers = {});
return d[b] = c, !c && Rd(d) && (a.gutterMarkers = null), !0
})
}),
clearGutter: Z(null, function (a) {
var b = this,
c = b.doc,
d = c.first;
c.iter(function (c) {
c.gutterMarkers && c.gutterMarkers[a] && (c.gutterMarkers[a] = null, ab(b, d, d + 1), Rd(c.gutterMarkers) && (c.gutterMarkers = null)), ++d
})
}),
addLineClass: Z(null, function (a, b, c) {
return bc(this, a, function (a) {
var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "wrapClass";
if (a[d]) {
if (new RegExp("\\b" + c + "\\b").test(a[d])) return !1;
a[d] += " " + c
} else a[d] = c;
return !0
})
}),
removeLineClass: Z(null, function (a, b, c) {
return bc(this, a, function (a) {
var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "wrapClass",
e = a[d];
if (!e) return !1;
if (null == c) a[d] = null;
else {
var f = e.replace(new RegExp("^" + c + "\\b\\s*|\\s*\\b" + c + "\\b"), "");
if (f == e) return !1;
a[d] = f || null
}
return !0
})
}),
addLineWidget: Z(null, function (a, b, c) {
return Kc(this, a, b, c)
}),
removeLineWidget: function (a) {
a.clear()
},
lineInfo: function (a) {
if ("number" == typeof a) {
if (!Sb(this.doc, a)) return null;
var b = a;
if (a = bd(this.doc, a), !a) return null
} else {
var b = fd(a);
if (null == b) return null
}
return {
line: b,
handle: a,
text: a.text,
gutterMarkers: a.gutterMarkers,
textClass: a.textClass,
bgClass: a.bgClass,
wrapClass: a.wrapClass,
widgets: a.widgets
}
},
getViewport: function () {
return {
from: this.display.showingFrom,
to: this.display.showingTo
}
},
addWidget: function (a, b, c, d, e) {
var f = this.display;
a = R(this, Qb(this.doc, a));
var g = a.bottom,
h = a.left;
if (b.style.position = "absolute", f.sizer.appendChild(b), "over" == d) g = a.top;
else if ("above" == d || "near" == d) {
var i = Math.max(f.wrapper.clientHeight, this.doc.height),
j = Math.max(f.sizer.clientWidth, f.lineSpace.clientWidth);
("above" == d || a.bottom + b.offsetHeight > i) && a.top > b.offsetHeight ? g = a.top - b.offsetHeight : a.bottom + b.offsetHeight <= i && (g = a.bottom), h + b.offsetWidth > j && (h = j - b.offsetWidth)
}
b.style.top = g + J(f) + "px", b.style.left = b.style.right = "", "right" == e ? (h = f.sizer.clientWidth - b.offsetWidth, b.style.right = "0px") : ("left" == e ? h = 0 : "middle" == e && (h = (f.sizer.clientWidth - b.offsetWidth) / 2), b.style.left = h + "px"), c && $b(this, h, g, h + b.offsetWidth, g + b.offsetHeight)
},
triggerOnKeyDown: Z(null, vb),
execCommand: function (a) {
return Se[a](this)
},
findPosH: function (a, b, c, d) {
var e = 1;
0 > b && (e = -1, b = -b);
for (var f = 0, g = Qb(this.doc, a); b > f && (g = cc(this.doc, g, e, c, d), !g.hitSide); ++f);
return g
},
moveH: Z(null, function (a, b) {
var c, d = this.doc.sel;
c = d.shift || d.extend || Mb(d.from, d.to) ? cc(this.doc, d.head, a, b, this.options.rtlMoveVisually) : 0 > a ? d.from : d.to, Tb(this.doc, c, c, a)
}),
deleteH: Z(null, function (a, b) {
var c = this.doc.sel;
Mb(c.from, c.to) ? Kb(this.doc, "", c.from, cc(this.doc, c.head, a, b, !1), "+delete") : Kb(this.doc, "", c.from, c.to, "+delete"), this.curOp.userSelChange = !0
}),
findPosV: function (a, b, c, d) {
var e = 1,
f = d;
0 > b && (e = -1, b = -b);
for (var g = 0, h = Qb(this.doc, a); b > g; ++g) {
var i = R(this, h, "div");
if (null == f ? f = i.left : i.left = f, h = dc(this, i, e, c), h.hitSide) break
}
return h
},
moveV: Z(null, function (a, b) {
var c = this.doc.sel,
d = R(this, c.head, "div");
null != c.goalColumn && (d.left = c.goalColumn);
var e = dc(this, d, a, b);
"page" == b && (this.display.scrollbarV.scrollTop += Q(this, e, "div").top - d.top), Tb(this.doc, e, e, a), c.goalColumn = d.left
}),
toggleOverwrite: function () {
(this.state.overwrite = !this.state.overwrite) ? this.display.cursor.className += " CodeMirror-overwrite" : this.display.cursor.className = this.display.cursor.className.replace(" CodeMirror-overwrite", "")
},
scrollTo: Z(null, function (a, b) {
this.curOp.updateScrollPos = {
scrollLeft: a,
scrollTop: b
}
}),
getScrollInfo: function () {
var a = this.display.scroller,
b = bf;
return {
left: a.scrollLeft,
top: a.scrollTop,
height: a.scrollHeight - b,
width: a.scrollWidth - b,
clientHeight: a.clientHeight - b,
clientWidth: a.clientWidth - b
}
},
scrollIntoView: function (a) {
"number" == typeof a && (a = Lb(a, 0)), a && null == a.line ? $b(this, a.left, a.top, a.right, a.bottom) : (a = a ? Qb(this.doc, a) : this.doc.sel.head, Zb(this, a))
},
setSize: function (a, b) {
function c(a) {
return "number" == typeof a || /^\d+$/.test(String(a)) ? a + "px" : a
}
null != a && (this.display.wrapper.style.width = c(a)), null != b && (this.display.wrapper.style.height = c(b)), this.refresh()
},
on: function (a, b) {
Ad(this, a, b)
},
off: function (a, b) {
Bd(this, a, b)
},
operation: function (a) {
return _(this, a)
},
refresh: Z(null, function () {
O(this), this.curOp.updateScrollPos = {
scrollTop: this.doc.scrollTop,
scrollLeft: this.doc.scrollLeft
}, ab(this)
}),
swapDoc: Z(null, function (a) {
var b = this.doc;
return b.cm = null, ad(this, a), O(this), this.curOp.updateScrollPos = {
scrollTop: a.scrollTop,
scrollLeft: a.scrollLeft
}, b
}),
getInputField: function () {
return this.display.input
},
getWrapperElement: function () {
return this.display.wrapper
},
getScrollerElement: function () {
return this.display.scroller
},
getGutterElement: function () {
return this.display.gutters
}
};
var Le = a.optionHandlers = {}, Me = a.defaults = {}, Ne = a.Init = {
toString: function () {
return "CodeMirror.Init"
}
};
gc("value", "", function (a, b) {
a.setValue(b)
}, !0), gc("mode", null, function (a, b) {
a.doc.modeOption = b, c(a)
}, !0), gc("indentUnit", 2, c, !0), gc("indentWithTabs", !1), gc("smartIndent", !0), gc("tabSize", 4, function (a) {
c(a), O(a), ab(a)
}, !0), gc("electricChars", !0), gc("rtlMoveVisually", !we), gc("theme", "default", function (a) {
h(a), i(a)
}, !0), gc("keyMap", "default", g), gc("extraKeys", null), gc("onKeyEvent", null), gc("onDragEvent", null), gc("lineWrapping", !1, d, !0), gc("gutters", [], function (a) {
m(a.options), i(a)
}, !0), gc("fixedGutter", !0, function (a, b) {
a.display.gutters.style.left = b ? s(a.display) + "px" : "0", a.refresh()
}, !0), gc("lineNumbers", !1, function (a) {
m(a.options), i(a)
}, !0), gc("firstLineNumber", 1, i, !0), gc("lineNumberFormatter", function (a) {
return a
}, i, !0), gc("showCursorWhenSelecting", !1, B, !0), gc("readOnly", !1, function (a, b) {
"nocursor" == b ? (yb(a), a.display.input.blur()) : b || eb(a, !0)
}), gc("dragDrop", !0), gc("cursorBlinkRate", 530), gc("cursorHeight", 1), gc("workTime", 100), gc("workDelay", 100), gc("flattenSpans", !0), gc("pollInterval", 100), gc("undoDepth", 40, function (a, b) {
a.doc.history.undoDepth = b
}), gc("viewportMargin", 10, function (a) {
a.refresh()
}, !0), gc("tabindex", null, function (a, b) {
a.display.input.tabIndex = b || ""
}), gc("autofocus", null);
var Oe = a.modes = {}, Pe = a.mimeModes = {};
a.defineMode = function (b, c) {
if (a.defaults.mode || "null" == b || (a.defaults.mode = b), arguments.length > 2) {
c.dependencies = [];
for (var d = 2; d < arguments.length; ++d) c.dependencies.push(arguments[d])
}
Oe[b] = c
}, a.defineMIME = function (a, b) {
Pe[a] = b
}, a.resolveMode = function (b) {
if ("string" == typeof b && Pe.hasOwnProperty(b)) b = Pe[b];
else if ("string" == typeof b && /^[\w\-]+\/[\w\-]+\+xml$/.test(b)) return a.resolveMode("application/xml");
return "string" == typeof b ? {
name: b
} : b || {
name: "null"
}
}, a.getMode = function (b, c) {
c = a.resolveMode(c);
var d = Oe[c.name];
if (!d) return a.getMode(b, "text/plain");
var e = d(b, c);
if (Qe.hasOwnProperty(c.name)) {
var f = Qe[c.name];
for (var g in f) f.hasOwnProperty(g) && (e.hasOwnProperty(g) && (e["_" + g] = e[g]), e[g] = f[g])
}
return e.name = c.name, e
}, a.defineMode("null", function () {
return {
token: function (a) {
a.skipToEnd()
}
}
}), a.defineMIME("text/plain", "null");
var Qe = a.modeExtensions = {};
a.extendMode = function (a, b) {
var c = Qe.hasOwnProperty(a) ? Qe[a] : Qe[a] = {};
Nd(b, c)
}, a.defineExtension = function (b, c) {
a.prototype[b] = c
}, a.defineOption = gc;
var Re = [];
a.defineInitHook = function (a) {
Re.push(a)
}, a.copyState = hc, a.startState = ic, a.innerMode = function (a, b) {
for (; a.innerMode;) {
var c = a.innerMode(b);
b = c.state, a = c.mode
}
return c || {
mode: a,
state: b
}
};
var Se = a.commands = {
selectAll: function (a) {
a.setSelection(Lb(a.firstLine(), 0), Lb(a.lastLine()))
},
killLine: function (a) {
var b = a.getCursor(!0),
c = a.getCursor(!1),
d = !Mb(b, c);
d || a.getLine(b.line).length != b.ch ? a.replaceRange("", b, d ? c : Lb(b.line), "+delete") : a.replaceRange("", b, Lb(b.line + 1, 0), "+delete")
},
deleteLine: function (a) {
var b = a.getCursor().line;
a.replaceRange("", Lb(b, 0), Lb(b), "+delete")
},
undo: function (a) {
a.undo()
},
redo: function (a) {
a.redo()
},
goDocStart: function (a) {
a.extendSelection(Lb(a.firstLine(), 0))
},
goDocEnd: function (a) {
a.extendSelection(Lb(a.lastLine()))
},
goLineStart: function (a) {
a.extendSelection(ce(a, a.getCursor().line))
},
goLineStartSmart: function (a) {
var b = a.getCursor(),
c = ce(a, b.line),
d = a.getLineHandle(c.line),
e = id(d);
if (e && 0 != e[0].level) a.extendSelection(c);
else {
var f = Math.max(0, d.text.search(/\S/)),
g = b.line == c.line && b.ch <= f && b.ch;
a.extendSelection(Lb(c.line, g ? 0 : f))
}
},
goLineEnd: function (a) {
a.extendSelection(de(a, a.getCursor().line))
},
goLineUp: function (a) {
a.moveV(-1, "line")
},
goLineDown: function (a) {
a.moveV(1, "line")
},
goPageUp: function (a) {
a.moveV(-1, "page")
},
goPageDown: function (a) {
a.moveV(1, "page")
},
goCharLeft: function (a) {
a.moveH(-1, "char")
},
goCharRight: function (a) {
a.moveH(1, "char")
},
goColumnLeft: function (a) {
a.moveH(-1, "column")
},
goColumnRight: function (a) {
a.moveH(1, "column")
},
goWordLeft: function (a) {
a.moveH(-1, "word")
},
goWordRight: function (a) {
a.moveH(1, "word")
},
delCharBefore: function (a) {
a.deleteH(-1, "char")
},
delCharAfter: function (a) {
a.deleteH(1, "char")
},
delWordBefore: function (a) {
a.deleteH(-1, "word")
},
delWordAfter: function (a) {
a.deleteH(1, "word")
},
indentAuto: function (a) {
a.indentSelection("smart")
},
indentMore: function (a) {
a.indentSelection("add")
},
indentLess: function (a) {
a.indentSelection("subtract")
},
insertTab: function (a) {
a.replaceSelection("	", "end", "+input")
},
defaultTab: function (a) {
a.somethingSelected() ? a.indentSelection("add") : a.replaceSelection("	", "end", "+input")
},
transposeChars: function (a) {
var b = a.getCursor(),
c = a.getLine(b.line);
b.ch > 0 && b.ch < c.length - 1 && a.replaceRange(c.charAt(b.ch) + c.charAt(b.ch - 1), Lb(b.line, b.ch - 1), Lb(b.line, b.ch + 1))
},
newlineAndIndent: function (a) {
Z(a, function () {
a.replaceSelection("\n", "end", "+input"), a.indentLine(a.getCursor().line, null, !0)
})()
},
toggleOverwrite: function (a) {
a.toggleOverwrite()
}
}, Te = a.keyMap = {};
Te.basic = {
Left: "goCharLeft",
Right: "goCharRight",
Up: "goLineUp",
Down: "goLineDown",
End: "goLineEnd",
Home: "goLineStartSmart",
PageUp: "goPageUp",
PageDown: "goPageDown",
Delete: "delCharAfter",
Backspace: "delCharBefore",
Tab: "defaultTab",
"Shift-Tab": "indentAuto",
Enter: "newlineAndIndent",
Insert: "toggleOverwrite"
}, Te.pcDefault = {
"Ctrl-A": "selectAll",
"Ctrl-D": "deleteLine",
"Ctrl-Z": "undo",
"Shift-Ctrl-Z": "redo",
"Ctrl-Y": "redo",
"Ctrl-Home": "goDocStart",
"Alt-Up": "goDocStart",
"Ctrl-End": "goDocEnd",
"Ctrl-Down": "goDocEnd",
"Ctrl-Left": "goWordLeft",
"Ctrl-Right": "goWordRight",
"Alt-Left": "goLineStart",
"Alt-Right": "goLineEnd",
"Ctrl-Backspace": "delWordBefore",
"Ctrl-Delete": "delWordAfter",
"Ctrl-S": "save",
"Ctrl-F": "find",
"Ctrl-G": "findNext",
"Shift-Ctrl-G": "findPrev",
"Shift-Ctrl-F": "replace",
"Shift-Ctrl-R": "replaceAll",
"Ctrl-[": "indentLess",
"Ctrl-]": "indentMore",
fallthrough: "basic"
}, Te.macDefault = {
"Cmd-A": "selectAll",
"Cmd-D": "deleteLine",
"Cmd-Z": "undo",
"Shift-Cmd-Z": "redo",
"Cmd-Y": "redo",
"Cmd-Up": "goDocStart",
"Cmd-End": "goDocEnd",
"Cmd-Down": "goDocEnd",
"Alt-Left": "goWordLeft",
"Alt-Right": "goWordRight",
"Cmd-Left": "goLineStart",
"Cmd-Right": "goLineEnd",
"Alt-Backspace": "delWordBefore",
"Ctrl-Alt-Backspace": "delWordAfter",
"Alt-Delete": "delWordAfter",
"Cmd-S": "save",
"Cmd-F": "find",
"Cmd-G": "findNext",
"Shift-Cmd-G": "findPrev",
"Cmd-Alt-F": "replace",
"Shift-Cmd-Alt-F": "replaceAll",
"Cmd-[": "indentLess",
"Cmd-]": "indentMore",
fallthrough: ["basic", "emacsy"]
}, Te["default"] = ve ? Te.macDefault : Te.pcDefault, Te.emacsy = {
"Ctrl-F": "goCharRight",
"Ctrl-B": "goCharLeft",
"Ctrl-P": "goLineUp",
"Ctrl-N": "goLineDown",
"Alt-F": "goWordRight",
"Alt-B": "goWordLeft",
"Ctrl-A": "goLineStart",
"Ctrl-E": "goLineEnd",
"Ctrl-V": "goPageDown",
"Shift-Ctrl-V": "goPageUp",
"Ctrl-D": "delCharAfter",
"Ctrl-H": "delCharBefore",
"Alt-D": "delWordAfter",
"Alt-Backspace": "delWordBefore",
"Ctrl-K": "killLine",
"Ctrl-T": "transposeChars"
}, a.lookupKey = kc, a.isModifierKey = lc, a.keyName = mc, a.fromTextArea = function (b, c) {
function d() {
b.value = j.getValue()
}
if (c || (c = {}), c.value = b.value, !c.tabindex && b.tabindex && (c.tabindex = b.tabindex), null == c.autofocus) {
var e = document.body;
try {
e = document.activeElement
} catch (f) {}
c.autofocus = e == b || null != b.getAttribute("autofocus") && e == document.body
}
if (b.form) {
Ad(b.form, "submit", d);
var g = b.form,
h = g.submit;
try {
var i = g.submit = function () {
d(), g.submit = h, g.submit(), g.submit = i
}
} catch (f) {}
}
b.style.display = "none";
var j = a(function (a) {
b.parentNode.insertBefore(a, b.nextSibling)
}, c);
return j.save = d, j.getTextArea = function () {
return b
}, j.toTextArea = function () {
d(), b.parentNode.removeChild(j.getWrapperElement()), b.style.display = "", b.form && (Bd(b.form, "submit", d), "function" == typeof b.form.submit && (b.form.submit = h))
}, j
}, nc.prototype = {
eol: function () {
return this.pos >= this.string.length
},
sol: function () {
return 0 == this.pos
},
peek: function () {
return this.string.charAt(this.pos) || void 0
},
next: function () {
return this.pos < this.string.length ? this.string.charAt(this.pos++) : void 0
},
eat: function (a) {
var b = this.string.charAt(this.pos);
if ("string" == typeof a) var c = b == a;
else var c = b && (a.test ? a.test(b) : a(b));
return c ? (++this.pos, b) : void 0
},
eatWhile: function (a) {
for (var b = this.pos; this.eat(a););
return this.pos > b
},
eatSpace: function () {
for (var a = this.pos;
/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;
return this.pos > a
},
skipToEnd: function () {
this.pos = this.string.length
},
skipTo: function (a) {
var b = this.string.indexOf(a, this.pos);
return b > -1 ? (this.pos = b, !0) : void 0
},
backUp: function (a) {
this.pos -= a
},
column: function () {
return Hd(this.string, this.start, this.tabSize)
},
indentation: function () {
return Hd(this.string, null, this.tabSize)
},
match: function (a, b, c) {
if ("string" != typeof a) {
var d = this.string.slice(this.pos).match(a);
return d && d.index > 0 ? null : (d && b !== !1 && (this.pos += d[0].length), d)
}
var e = function (a) {
return c ? a.toLowerCase() : a
};
return e(this.string).indexOf(e(a), this.pos) == this.pos ? (b !== !1 && (this.pos += a.length), !0) : void 0
},
current: function () {
return this.string.slice(this.start, this.pos)
}
}, a.StringStream = nc, a.TextMarker = oc, oc.prototype.clear = function () {
if (!this.explicitlyCleared) {
var a = this.doc.cm,
b = a && !a.curOp;
b && X(a);
for (var c = null, d = null, e = 0; e < this.lines.length; ++e) {
var f = this.lines[e],
g = sc(f.markedSpans, this);
null != g.to && (d = fd(f)), f.markedSpans = tc(f.markedSpans, g), null != g.from ? c = fd(f) : this.collapsed && !Ec(this.doc, f) && a && ed(f, V(a.display))
}
if (a && this.collapsed && !a.options.lineWrapping)
for (var e = 0; e < this.lines.length; ++e) {
var h = Dc(a.doc, this.lines[e]),
i = k(a.doc, h);
i > a.display.maxLineLength && (a.display.maxLine = h, a.display.maxLineLength = i, a.display.maxLineChanged = !0)
}
null != c && a && ab(a, c, d + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.collapsed && this.doc.cantEdit && (this.doc.cantEdit = !1, a && Wb(a)), b && Y(a), Dd(this, "clear")
}
}, oc.prototype.find = function () {
for (var a, b, c = 0; c < this.lines.length; ++c) {
var d = this.lines[c],
e = sc(d.markedSpans, this);
if (null != e.from || null != e.to) {
var f = fd(d);
null != e.from && (a = Lb(f, e.from)), null != e.to && (b = Lb(f, e.to))
}
}
return "bookmark" == this.type ? a : a && {
from: a,
to: b
}
}, oc.prototype.getOptions = function (a) {
var b = this.replacedWith;
return {
className: this.className,
inclusiveLeft: this.inclusiveLeft,
inclusiveRight: this.inclusiveRight,
atomic: this.atomic,
collapsed: this.collapsed,
clearOnEnter: this.clearOnEnter,
replacedWith: a ? b && b.cloneNode(!0) : b,
readOnly: this.readOnly,
startStyle: this.startStyle,
endStyle: this.endStyle
}
}, oc.prototype.attachLine = function (a) {
if (!this.lines.length && this.doc.cm) {
var b = this.doc.cm.curOp;
b.maybeHiddenMarkers && -1 != Ld(b.maybeHiddenMarkers, this) || (b.maybeUnhiddenMarkers || (b.maybeUnhiddenMarkers = [])).push(this)
}
this.lines.push(a)
}, oc.prototype.detachLine = function (a) {
if (this.lines.splice(Ld(this.lines, a), 1), !this.lines.length && this.doc.cm) {
var b = this.doc.cm.curOp;
(b.maybeHiddenMarkers || (b.maybeHiddenMarkers = [])).push(this)
}
}, a.SharedTextMarker = qc, qc.prototype.clear = function () {
if (!this.explicitlyCleared) {
this.explicitlyCleared = !0;
for (var a = 0; a < this.markers.length; ++a) this.markers[a].clear();
Dd(this, "clear")
}
}, qc.prototype.find = function () {
return this.primary.find()
}, qc.prototype.getOptions = function (a) {
var b = this.primary.getOptions(a);
return b.shared = !0, b
};
var Ue = a.LineWidget = function (a, b, c) {
for (var d in c) c.hasOwnProperty(d) && (this[d] = c[d]);
this.cm = a, this.node = b
};
Ue.prototype.clear = Ic(function () {
var a = this.line.widgets,
b = fd(this.line);
if (null != b && a) {
for (var c = 0; c < a.length; ++c) a[c] == this && a.splice(c--, 1);
a.length || (this.line.widgets = null), ed(this.line, Math.max(0, this.line.height - Jc(this))), ab(this.cm, b, b + 1)
}
}), Ue.prototype.changed = Ic(function () {
var a = this.height;
this.height = null;
var b = Jc(this) - a;
if (b) {
ed(this.line, this.line.height + b);
var c = fd(this.line);
ab(this.cm, c, c + 1)
}
});
var Ve = {}, We = /[\t\u0000-\u0019\u200b\u2028\u2029\uFEFF]/g;
Zc.prototype = {
chunkSize: function () {
return this.lines.length
},
removeInner: function (a, b) {
for (var c = a, d = a + b; d > c; ++c) {
var e = this.lines[c];
this.height -= e.height, Nc(e), Dd(e, "delete")
}
this.lines.splice(a, b)
},
collapse: function (a) {
a.splice.apply(a, [a.length, 0].concat(this.lines))
},
insertInner: function (a, b, c) {
this.height += c, this.lines = this.lines.slice(0, a).concat(b).concat(this.lines.slice(a));
for (var d = 0, e = b.length; e > d; ++d) b[d].parent = this
},
iterN: function (a, b, c) {
for (var d = a + b; d > a; ++a)
if (c(this.lines[a])) return !0
}
}, $c.prototype = {
chunkSize: function () {
return this.size
},
removeInner: function (a, b) {
this.size -= b;
for (var c = 0; c < this.children.length; ++c) {
var d = this.children[c],
e = d.chunkSize();
if (e > a) {
var f = Math.min(b, e - a),
g = d.height;
if (d.removeInner(a, f), this.height -= g - d.height, e == f && (this.children.splice(c--, 1), d.parent = null), 0 == (b -= f)) break;
a = 0
} else a -= e
}
if (this.size - b < 25) {
var h = [];
this.collapse(h), this.children = [new Zc(h)], this.children[0].parent = this
}
},
collapse: function (a) {
for (var b = 0, c = this.children.length; c > b; ++b) this.children[b].collapse(a)
},
insertInner: function (a, b, c) {
this.size += b.length, this.height += c;
for (var d = 0, e = this.children.length; e > d; ++d) {
var f = this.children[d],
g = f.chunkSize();
if (g >= a) {
if (f.insertInner(a, b, c), f.lines && f.lines.length > 50) {
for (; f.lines.length > 50;) {
var h = f.lines.splice(f.lines.length - 25, 25),
i = new Zc(h);
f.height -= i.height, this.children.splice(d + 1, 0, i), i.parent = this
}
this.maybeSpill()
}
break
}
a -= g
}
},
maybeSpill: function () {
if (!(this.children.length <= 10)) {
var a = this;
do {
var b = a.children.splice(a.children.length - 5, 5),
c = new $c(b);
if (a.parent) {
a.size -= c.size, a.height -= c.height;
var d = Ld(a.parent.children, a);
a.parent.children.splice(d + 1, 0, c)
} else {
var e = new $c(a.children);
e.parent = a, a.children = [e, c], a = e
}
c.parent = a.parent
} while (a.children.length > 10);
a.parent.maybeSpill()
}
},
iterN: function (a, b, c) {
for (var d = 0, e = this.children.length; e > d; ++d) {
var f = this.children[d],
g = f.chunkSize();
if (g > a) {
var h = Math.min(b, g - a);
if (f.iterN(a, h, c)) return !0;
if (0 == (b -= h)) break;
a = 0
} else a -= g
}
}
};
var Xe = 0,
Ye = a.Doc = function (a, b, c) {
if (!(this instanceof Ye)) return new Ye(a, b, c);
null == c && (c = 0), $c.call(this, [new Zc([Lc("", null)])]), this.first = c, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.history = jd(), this.frontier = c;
var d = Lb(c, 0);
this.sel = {
from: d,
to: d,
head: d,
anchor: d,
shift: !1,
extend: !1,
goalColumn: null
}, this.id = ++Xe, this.modeOption = b, "string" == typeof a && (a = lf(a)), Yc(this, {
from: d,
to: d,
text: a
}, null, {
head: d,
anchor: d
})
};
Ye.prototype = Md($c.prototype, {
iter: function (a, b, c) {
c ? this.iterN(a - this.first, b - a, c) : this.iterN(this.first, this.first + this.size, a)
},
insert: function (a, b) {
for (var c = 0, d = 0, e = b.length; e > d; ++d) c += b[d].height;
this.insertInner(a - this.first, b, c)
},
remove: function (a, b) {
this.removeInner(a - this.first, b)
},
getValue: function (a) {
var b = dd(this, this.first, this.first + this.size);
return a === !1 ? b : b.join(a || "\n")
},
setValue: function (a) {
var b = Lb(this.first, 0),
c = this.first + this.size - 1;
Eb(this, {
from: b,
to: Lb(c, bd(this, c).text.length),
text: lf(a),
origin: "setValue"
}, {
head: b,
anchor: b
}, !0)
},
replaceRange: function (a, b, c, d) {
b = Qb(this, b), c = c ? Qb(this, c) : b, Kb(this, a, b, c, d)
},
getRange: function (a, b, c) {
var d = cd(this, Qb(this, a), Qb(this, b));
return c === !1 ? d : d.join(c || "\n")
},
getLine: function (a) {
var b = this.getLineHandle(a);
return b && b.text
},
setLine: function (a, b) {
Sb(this, a) && Kb(this, b, Lb(a, 0), Qb(this, Lb(a)))
},
removeLine: function (a) {
Sb(this, a) && Kb(this, "", Lb(a, 0), Qb(this, Lb(a + 1, 0)))
},
getLineHandle: function (a) {
return Sb(this, a) ? bd(this, a) : void 0
},
getLineNumber: function (a) {
return fd(a)
},
lineCount: function () {
return this.size
},
firstLine: function () {
return this.first
},
lastLine: function () {
return this.first + this.size - 1
},
clipPos: function (a) {
return Qb(this, a)
},
getCursor: function (a) {
var b, c = this.sel;
return b = null == a || "head" == a ? c.head : "anchor" == a ? c.anchor : "end" == a || a === !1 ? c.to : c.from, Ob(b)
},
somethingSelected: function () {
return !Mb(this.sel.head, this.sel.anchor)
},
setCursor: $(function (a, b, c) {
var d = Qb(this, "number" == typeof a ? Lb(a, b || 0) : a);
c ? Tb(this, d) : Vb(this, d, d)
}),
setSelection: $(function (a, b) {
Vb(this, Qb(this, a), Qb(this, b || a))
}),
extendSelection: $(function (a, b) {
Tb(this, Qb(this, a), b && Qb(this, b))
}),
getSelection: function (a) {
return this.getRange(this.sel.from, this.sel.to, a)
},
replaceSelection: function (a, b, c) {
Eb(this, {
from: this.sel.from,
to: this.sel.to,
text: lf(a),
origin: c
}, b || "around")
},
undo: $(function () {
Gb(this, "undo")
}),
redo: $(function () {
Gb(this, "redo")
}),
setExtending: function (a) {
this.sel.extend = a
},
historySize: function () {
var a = this.history;
return {
undo: a.done.length,
redo: a.undone.length
}
},
clearHistory: function () {
this.history = jd()
},
markClean: function () {
this.history.dirtyCounter = 0, this.history.lastOp = this.history.lastOrigin = null
},
isClean: function () {
return 0 == this.history.dirtyCounter
},
getHistory: function () {
return {
done: pd(this.history.done),
undone: pd(this.history.undone)
}
},
setHistory: function (a) {
var b = this.history = jd();
b.done = a.done.slice(0), b.undone = a.undone.slice(0)
},
markText: function (a, b, c) {
return pc(this, Qb(this, a), Qb(this, b), c, "range")
},
setBookmark: function (a, b) {
var c = {
replacedWith: b && (null == b.nodeType ? b.widget : b),
insertLeft: b && b.insertLeft
};
return a = Qb(this, a), pc(this, a, a, c, "bookmark")
},
findMarksAt: function (a) {
a = Qb(this, a);
var b = [],
c = bd(this, a.line).markedSpans;
if (c)
for (var d = 0; d < c.length; ++d) {
var e = c[d];
(null == e.from || e.from <= a.ch) && (null == e.to || e.to >= a.ch) && b.push(e.marker.parent || e.marker)
}
return b
},
getAllMarks: function () {
var a = [];
return this.iter(function (b) {
var c = b.markedSpans;
if (c)
for (var d = 0; d < c.length; ++d) null != c[d].from && a.push(c[d].marker)
}), a
},
posFromIndex: function (a) {
var b, c = this.first;
return this.iter(function (d) {
var e = d.text.length + 1;
return e > a ? (b = a, !0) : (a -= e, ++c, void 0)
}), Qb(this, Lb(c, b))
},
indexFromPos: function (a) {
a = Qb(this, a);
var b = a.ch;
return a.line < this.first || a.ch < 0 ? 0 : (this.iter(this.first, a.line, function (a) {
b += a.text.length + 1
}), b)
},
copy: function (a) {
var b = new Ye(dd(this, this.first, this.first + this.size), this.modeOption, this.first);
return b.scrollTop = this.scrollTop, b.scrollLeft = this.scrollLeft, b.sel = {
from: this.sel.from,
to: this.sel.to,
head: this.sel.head,
anchor: this.sel.anchor,
shift: this.sel.shift,
extend: !1,
goalColumn: this.sel.goalColumn
}, a && (b.history.undoDepth = this.history.undoDepth, b.setHistory(this.getHistory())), b
},
linkedDoc: function (a) {
a || (a = {});
var b = this.first,
c = this.first + this.size;
null != a.from && a.from > b && (b = a.from), null != a.to && a.to < c && (c = a.to);
var d = new Ye(dd(this, b, c), a.mode || this.modeOption, b);
return a.sharedHist && (d.history = this.history), (this.linked || (this.linked = [])).push({
doc: d,
sharedHist: a.sharedHist
}), d.linked = [{
doc: this,
isParent: !0,
sharedHist: a.sharedHist
}], d
},
unlinkDoc: function (b) {
if (b instanceof a && (b = b.doc), this.linked)
for (var c = 0; c < this.linked.length; ++c) {
var d = this.linked[c];
if (d.doc == b) {
this.linked.splice(c, 1), b.unlinkDoc(this);
break
}
}
if (b.history == this.history) {
var e = [b.id];
_c(b, function (a) {
e.push(a.id)
}, !0), b.history = jd(), b.history.done = pd(this.history.done, e), b.history.undone = pd(this.history.undone, e)
}
},
iterLinkedDocs: function (a) {
_c(this, a)
},
getMode: function () {
return this.mode
},
getEditor: function () {
return this.cm
}
}), Ye.prototype.eachLine = Ye.prototype.iter;
var Ze = "iter insert remove copy getEditor".split(" ");
for (var $e in Ye.prototype) Ye.prototype.hasOwnProperty($e) && Ld(Ze, $e) < 0 && (a.prototype[$e] = function (a) {
return function () {
return a.apply(this.doc, arguments)
}
}(Ye.prototype[$e]));
a.e_stop = xd, a.e_preventDefault = vd, a.e_stopPropagation = wd;
var _e, af = 0;
a.on = Ad, a.off = Bd, a.signal = Cd;
var bf = 30,
cf = a.Pass = {
toString: function () {
return "CodeMirror.Pass"
}
};
Gd.prototype = {
set: function (a, b) {
clearTimeout(this.id), this.id = setTimeout(b, a)
}
}, a.countColumn = Hd;
var df = [""],
ef = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc]/,
ff = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/;
a.replaceGetRect = function (a) {
Wd = a
};
var gf = function () {
if (je) return !1;
var a = Sd("div");
return "draggable" in a || "dragDrop" in a
}(),
hf = /^$/;
ge ? hf = /$'/ : oe ? hf = /\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/ : me && (hf = /\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/);
var jf, kf, lf = 3 != "\n\nb".split(/\n/).length ? function (a) {
for (var b = 0, c = [], d = a.length; d >= b;) {
var e = a.indexOf("\n", b); - 1 == e && (e = a.length);
var f = a.slice(b, "\r" == a.charAt(e - 1) ? e - 1 : e),
g = f.indexOf("\r"); - 1 != g ? (c.push(f.slice(0, g)), b += g + 1) : (c.push(f), b = e + 1)
}
return c
} : function (a) {
return a.split(/\r\n?|\n/)
};
a.splitLines = lf;
var mf = window.getSelection ? function (a) {
try {
return a.selectionStart != a.selectionEnd
} catch (b) {
return !1
}
} : function (a) {
try {
var b = a.ownerDocument.selection.createRange()
} catch (c) {}
return b && b.parentElement() == a ? 0 != b.compareEndPoints("StartToEnd", b) : !1
}, nf = function () {
var a = Sd("div");
return "oncopy" in a ? !0 : (a.setAttribute("oncopy", "return;"), "function" == typeof a.oncopy)
}(),
of = {
3: "Enter",
8: "Backspace",
9: "Tab",
13: "Enter",
16: "Shift",
17: "Ctrl",
18: "Alt",
19: "Pause",
20: "CapsLock",
27: "Esc",
32: "Space",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "Left",
38: "Up",
39: "Right",
40: "Down",
44: "PrintScrn",
45: "Insert",
46: "Delete",
59: ";",
91: "Mod",
92: "Mod",
93: "Mod",
109: "-",
107: "=",
127: "Delete",
186: ";",
187: "=",
188: ",",
189: "-",
190: ".",
191: "/",
192: "`",
219: "[",
220: "\\",
221: "]",
222: "'",
63276: "PageUp",
63277: "PageDown",
63275: "End",
63273: "Home",
63234: "Left",
63232: "Up",
63235: "Right",
63233: "Down",
63302: "Insert",
63272: "Delete"
};
a.keyNames = of,
function () {
for (var a = 0; 10 > a; a++) of[a + 48] = String(a);
for (var a = 65; 90 >= a; a++) of[a] = String.fromCharCode(a);
for (var a = 1; 12 >= a; a++) of[a + 111] = of[a + 63235] = "F" + a
}();
var pf = function () {
function a(a) {
return 255 >= a ? b.charAt(a) : a >= 1424 && 1524 >= a ? "R" : a >= 1536 && 1791 >= a ? c.charAt(a - 1536) : a >= 1792 && 2220 >= a ? "r" : "L"
}
var b = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",
c = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",
d = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,
e = /[stwN]/,
f = /[LRr]/,
g = /[Lb1n]/,
h = /[1n]/,
i = "L";
return function (b) {
if (!d.test(b)) return !1;
for (var c, j = b.length, k = [], l = 0; j > l; ++l) k.push(c = a(b.charCodeAt(l)));
for (var l = 0, m = i; j > l; ++l) {
var c = k[l];
"m" == c ? k[l] = m : m = c
}
for (var l = 0, n = i; j > l; ++l) {
var c = k[l];
"1" == c && "r" == n ? k[l] = "n" : f.test(c) && (n = c, "r" == c && (k[l] = "R"))
}
for (var l = 1, m = k[0]; j - 1 > l; ++l) {
var c = k[l];
"+" == c && "1" == m && "1" == k[l + 1] ? k[l] = "1" : "," != c || m != k[l + 1] || "1" != m && "n" != m || (k[l] = m), m = c
}
for (var l = 0; j > l; ++l) {
var c = k[l];
if ("," == c) k[l] = "N";
else if ("%" == c) {
for (var o = l + 1; j > o && "%" == k[o]; ++o);
for (var p = l && "!" == k[l - 1] || j - 1 > o && "1" == k[o] ? "1" : "N", q = l; o > q; ++q) k[q] = p;
l = o - 1
}
}
for (var l = 0, n = i; j > l; ++l) {
var c = k[l];
"L" == n && "1" == c ? k[l] = "L" : f.test(c) && (n = c)
}
for (var l = 0; j > l; ++l)
if (e.test(k[l])) {
for (var o = l + 1; j > o && e.test(k[o]); ++o);
for (var r = "L" == (l ? k[l - 1] : i), s = "L" == (j - 1 > o ? k[o] : i), p = r || s ? "L" : "R", q = l; o > q; ++q) k[q] = p;
l = o - 1
}
for (var t, u = [], l = 0; j > l;)
if (g.test(k[l])) {
var v = l;
for (++l; j > l && g.test(k[l]); ++l);
u.push({
from: v,
to: l,
level: 0
})
} else {
var w = l,
x = u.length;
for (++l; j > l && "L" != k[l]; ++l);
for (var q = w; l > q;)
if (h.test(k[q])) {
q > w && u.splice(x, 0, {
from: w,
to: q,
level: 1
});
var y = q;
for (++q; l > q && h.test(k[q]); ++q);
u.splice(x, 0, {
from: y,
to: q,
level: 2
}), w = q
} else ++q;
l > w && u.splice(x, 0, {
from: w,
to: l,
level: 1
})
}
return 1 == u[0].level && (t = b.match(/^\s+/)) && (u[0].from = t[0].length, u.unshift({
from: 0,
to: t[0].length,
level: 0
})), 1 == Jd(u).level && (t = b.match(/\s+$/)) && (Jd(u).to -= t[0].length, u.push({
from: j - t[0].length,
to: j,
level: 0
})), u[0].level != Jd(u).level && u.push({
from: j,
to: j,
level: u[0].level
}), u
}
}();
return a.version = "3.1", a
}(), CodeMirror.defineMode("xml", function (a, b) {
function c(a, b) {
function c(c) {
return b.tokenize = c, c(a, b)
}
var e = a.next();
if ("<" == e) {
if (a.eat("!")) return a.eat("[") ? a.match("CDATA[") ? c(f("atom", "]]>")) : null : a.match("--") ? c(f("comment", "-->")) : a.match("DOCTYPE", !0, !0) ? (a.eatWhile(/[\w\._\-]/), c(g(1))) : null;
if (a.eat("?")) return a.eatWhile(/[\w\._\-]/), b.tokenize = f("meta", "?>"), "meta";
var h = a.eat("/");
t = "";
for (var i; i = a.eat(/[^\s\u00a0=<>\"\'\/?]/);) t += i;
return t ? (u = h ? "closeTag" : "openTag", b.tokenize = d, "tag") : "error"
}
if ("&" == e) {
var j;
return j = a.eat("#") ? a.eat("x") ? a.eatWhile(/[a-fA-F\d]/) && a.eat(";") : a.eatWhile(/[\d]/) && a.eat(";") : a.eatWhile(/[\w\.\-:]/) && a.eat(";"), j ? "atom" : "error"
}
return a.eatWhile(/[^&<]/), null
}

function d(a, b) {
var d = a.next();
return ">" == d || "/" == d && a.eat(">") ? (b.tokenize = c, u = ">" == d ? "endTag" : "selfcloseTag", "tag") : "=" == d ? (u = "equals", null) : /[\'\"]/.test(d) ? (b.tokenize = e(d), b.tokenize(a, b)) : (a.eatWhile(/[^\s\u00a0=<>\"\']/), "word")
}

function e(a) {
return function (b, c) {
for (; !b.eol();)
if (b.next() == a) {
c.tokenize = d;
break
}
return "string"
}
}

function f(a, b) {
return function (d, e) {
for (; !d.eol();) {
if (d.match(b)) {
e.tokenize = c;
break
}
d.next()
}
return a
}
}

function g(a) {
return function (b, d) {
for (var e; null != (e = b.next());) {
if ("<" == e) return d.tokenize = g(a + 1), d.tokenize(b, d);
if (">" == e) {
if (1 == a) {
d.tokenize = c;
break
}
return d.tokenize = g(a - 1), d.tokenize(b, d)
}
}
return "meta"
}
}

function h() {
for (var a = arguments.length - 1; a >= 0; a--) v.cc.push(arguments[a])
}

function i() {
return h.apply(null, arguments), !0
}

function j(a, b) {
var c = y.doNotIndent.hasOwnProperty(a) || v.context && v.context.noIndent;
v.context = {
prev: v.context,
tagName: a,
indent: v.indented,
startOfLine: b,
noIndent: c
}
}

function k() {
v.context && (v.context = v.context.prev)
}

function l(a) {
if ("openTag" == a) return v.tagName = t, i(p, m(v.startOfLine));
if ("closeTag" == a) {
var b = !1;
return v.context ? v.context.tagName != t && (y.implicitlyClosed.hasOwnProperty(v.context.tagName.toLowerCase()) && k(), b = !v.context || v.context.tagName != t) : b = !0, b && (w = "error"), i(n(b))
}
return i()
}

function m(a) {
return function (b) {
var c = v.tagName;
return v.tagName = null, "selfcloseTag" == b || "endTag" == b && y.autoSelfClosers.hasOwnProperty(c.toLowerCase()) ? (o(c.toLowerCase()), i()) : "endTag" == b ? (o(c.toLowerCase()), j(c, a), i()) : i()
}
}

function n(a) {
return function (b) {
return a && (w = "error"), "endTag" == b ? (k(), i()) : (w = "error", i(arguments.callee))
}
}

function o(a) {
for (var b;;) {
if (!v.context) return;
if (b = v.context.tagName.toLowerCase(), !y.contextGrabbers.hasOwnProperty(b) || !y.contextGrabbers[b].hasOwnProperty(a)) return;
k()
}
}

function p(a) {
return "word" == a ? (w = "attribute", i(q, p)) : "endTag" == a || "selfcloseTag" == a ? h() : (w = "error", i(p))
}

function q(a) {
return "equals" == a ? i(r, p) : (y.allowMissing ? "word" == a && (w = "attribute") : w = "error", "endTag" == a || "selfcloseTag" == a ? h() : i())
}

function r(a) {
return "string" == a ? i(s) : "word" == a && y.allowUnquoted ? (w = "string", i()) : (w = "error", "endTag" == a || "selfCloseTag" == a ? h() : i())
}

function s(a) {
return "string" == a ? i(s) : h()
}
var t, u, v, w, x = a.indentUnit,
y = b.htmlMode ? {
autoSelfClosers: {
area: !0,
base: !0,
br: !0,
col: !0,
command: !0,
embed: !0,
frame: !0,
hr: !0,
img: !0,
input: !0,
keygen: !0,
link: !0,
meta: !0,
param: !0,
source: !0,
track: !0,
wbr: !0
},
implicitlyClosed: {
dd: !0,
li: !0,
optgroup: !0,
option: !0,
p: !0,
rp: !0,
rt: !0,
tbody: !0,
td: !0,
tfoot: !0,
th: !0,
tr: !0
},
contextGrabbers: {
dd: {
dd: !0,
dt: !0
},
dt: {
dd: !0,
dt: !0
},
li: {
li: !0
},
option: {
option: !0,
optgroup: !0
},
optgroup: {
optgroup: !0
},
p: {
address: !0,
article: !0,
aside: !0,
blockquote: !0,
dir: !0,
div: !0,
dl: !0,
fieldset: !0,
footer: !0,
form: !0,
h1: !0,
h2: !0,
h3: !0,
h4: !0,
h5: !0,
h6: !0,
header: !0,
hgroup: !0,
hr: !0,
menu: !0,
nav: !0,
ol: !0,
p: !0,
pre: !0,
section: !0,
table: !0,
ul: !0
},
rp: {
rp: !0,
rt: !0
},
rt: {
rp: !0,
rt: !0
},
tbody: {
tbody: !0,
tfoot: !0
},
td: {
td: !0,
th: !0
},
tfoot: {
tbody: !0
},
th: {
td: !0,
th: !0
},
thead: {
tbody: !0,
tfoot: !0
},
tr: {
tr: !0
}
},
doNotIndent: {
pre: !0
},
allowUnquoted: !0,
allowMissing: !0
} : {
autoSelfClosers: {},
implicitlyClosed: {},
contextGrabbers: {},
doNotIndent: {},
allowUnquoted: !1,
allowMissing: !1
}, z = b.alignCDATA;
return {
startState: function () {
return {
tokenize: c,
cc: [],
indented: 0,
startOfLine: !0,
tagName: null,
context: null
}
},
token: function (a, b) {
if (a.sol() && (b.startOfLine = !0, b.indented = a.indentation()), a.eatSpace()) return null;
w = u = t = null;
var c = b.tokenize(a, b);
if (b.type = u, (c || u) && "comment" != c)
for (v = b;;) {
var d = b.cc.pop() || l;
if (d(u || c)) break
}
return b.startOfLine = !1, w || c
},
indent: function (a, b, e) {
var f = a.context;
if (a.tokenize != d && a.tokenize != c || f && f.noIndent) return e ? e.match(/^(\s*)/)[0].length : 0;
if (z && /<!\[CDATA\[/.test(b)) return 0;
for (f && /^<\//.test(b) && (f = f.prev); f && !f.startOfLine;) f = f.prev;
return f ? f.indent + x : 0
},
electricChars: "/",
configuration: b.htmlMode ? "html" : "xml"
}
}), CodeMirror.defineMIME("text/xml", "xml"), CodeMirror.defineMIME("application/xml", "xml"), CodeMirror.mimeModes.hasOwnProperty("text/html") || CodeMirror.defineMIME("text/html", {
name: "xml",
htmlMode: !0
}), CodeMirror.defineMode("css", function (a) {
function b(a) {
for (var b = {}, c = 0; c < a.length; ++c) b[a[c]] = !0;
return b
}

function c(a, b) {
return i = b, a
}

function d(a, b) {
var d = a.next();
if ("@" == d) return a.eatWhile(/[\w\\\-]/), c("def", a.current());
if ("/" == d && a.eat("*")) return b.tokenize = e, e(a, b);
if ("<" == d && a.eat("!")) return b.tokenize = f, f(a, b);
if ("=" == d) c(null, "compare");
else {
if (("~" == d || "|" == d) && a.eat("=")) return c(null, "compare");
if ('"' == d || "'" == d) return b.tokenize = g(d), b.tokenize(a, b);
if ("#" == d) return a.eatWhile(/[\w\\\-]/), c("atom", "hash");
if ("!" == d) return a.match(/^\s*\w*/), c("keyword", "important");
if (/\d/.test(d)) return a.eatWhile(/[\w.%]/), c("number", "unit");
if ("-" !== d) return /[,+>*\/]/.test(d) ? c(null, "select-op") : "." == d && a.match(/^-?[_a-z][_a-z0-9-]*/i) ? c("qualifier", "qualifier") : ":" == d ? c("operator", d) : /[;{}\[\]\(\)]/.test(d) ? c(null, d) : "u" == d && a.match("rl(") ? (a.backUp(1), b.tokenize = h, c("property", "variable")) : (a.eatWhile(/[\w\\\-]/), c("property", "variable"));
if (/\d/.test(a.peek())) return a.eatWhile(/[\w.%]/), c("number", "unit");
if (a.match(/^[^-]+-/)) return c("meta", "meta")
}
}

function e(a, b) {
for (var e, f = !1; null != (e = a.next());) {
if (f && "/" == e) {
b.tokenize = d;
break
}
f = "*" == e
}
return c("comment", "comment")
}

function f(a, b) {
for (var e, f = 0; null != (e = a.next());) {
if (f >= 2 && ">" == e) {
b.tokenize = d;
break
}
f = "-" == e ? f + 1 : 0
}
return c("comment", "comment")
}

function g(a, b) {
return function (e, f) {
for (var g, h = !1; null != (g = e.next()) && (g != a || h);) h = !h && "\\" == g;
return h || (b && e.backUp(1), f.tokenize = d), c("string", "string")
}
}

function h(a, b) {
return a.next(), b.tokenize = a.match(/\s*[\"\']/, !1) ? d : g(")", !0), c(null, "(")
}
var i, j = a.indentUnit,
k = b(["all", "aural", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "embossed"]),
l = b(["width", "min-width", "max-width", "height", "min-height", "max-height", "device-width", "min-device-width", "max-device-width", "device-height", "min-device-height", "max-device-height", "aspect-ratio", "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio", "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color", "max-color", "color-index", "min-color-index", "max-color-index", "monochrome", "min-monochrome", "max-monochrome", "resolution", "min-resolution", "max-resolution", "scan", "grid"]),
m = b(["align-content", "align-items", "align-self", "alignment-adjust", "alignment-baseline", "anchor-point", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "appearance", "azimuth", "backface-visibility", "background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "baseline-shift", "binding", "bleed", "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target", "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "clear", "clip", "color", "color-profile", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after", "cue-before", "cursor", "direction", "display", "dominant-baseline", "drop-initial-after-adjust", "drop-initial-after-align", "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size", "drop-initial-value", "elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "float-offset", "font", "font-feature-settings", "font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-synthesis", "font-variant", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position", "font-weight", "grid-cell", "grid-column", "grid-column-align", "grid-column-sizing", "grid-column-span", "grid-columns", "grid-flow", "grid-row", "grid-row-align", "grid-row-sizing", "grid-row-span", "grid-rows", "grid-template", "hanging-punctuation", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "inline-box-align", "justify-content", "left", "letter-spacing", "line-break", "line-height", "line-stacking", "line-stacking-ruby", "line-stacking-shift", "line-stacking-strategy", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "marker-offset", "marks", "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed", "marquee-style", "max-height", "max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "page", "page-break-after", "page-break-before", "page-break-inside", "page-policy", "pause", "pause-after", "pause-before", "perspective", "perspective-origin", "pitch", "pitch-range", "play-during", "position", "presentation-level", "punctuation-trim", "quotes", "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness", "right", "rotation", "rotation-point", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span", "size", "speak", "speak-as", "speak-header", "speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size", "table-layout", "target", "target-name", "target-new", "target-position", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-skip", "text-decoration-style", "text-emphasis", "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", "text-height", "text-indent", "text-justify", "text-outline", "text-shadow", "text-space-collapse", "text-transform", "text-underline-position", "text-wrap", "top", "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", "voice-balance", "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress", "voice-volume", "volume", "white-space", "widows", "width", "word-break", "word-spacing", "word-wrap", "z-index"]),
n = b(["black", "silver", "gray", "white", "maroon", "red", "purple", "fuchsia", "green", "lime", "olive", "yellow", "navy", "blue", "teal", "aqua"]),
o = b(["above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll", "alternate", "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", "arabic-indic", "armenian", "asterisks", "auto", "avoid", "background", "backwards", "baseline", "below", "bidi-override", "binary", "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button", "button-bevel", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote", "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu", "continuous", "copy", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default", "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "devanagari", "disc", "discard", "document", "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ew-resize", "expanded", "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "footnotes", "forwards", "from", "geometricPrecision", "georgian", "graytext", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", "help", "hidden", "hide", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore", "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "kannada", "katakana", "katakana-iroha", "khmer", "landscape", "lao", "large", "larger", "left", "level", "lighter", "line-through", "linear", "lines", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian", "lower-roman", "lowercase", "ltr", "malayalam", "match", "media-controls-background", "media-current-time-display", "media-fullscreen-button", "media-mute-button", "media-play-button", "media-return-to-realtime-button", "media-rewind-button", "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", "media-time-remaining-display", "media-volume-slider", "media-volume-slider-container", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button", "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "mongolian", "monospace", "move", "multiple", "myanmar", "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote", "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused", "persian", "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", "radio", "read-only", "read-write", "read-write-plaintext-only", "relative", "repeat", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif", "scroll", "scrollbar", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button", "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "single", "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over", "space", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super", "sw-resize", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row", "table-row-group", "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal", "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext", "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow"]);
return {
startState: function (a) {
return {
tokenize: d,
baseIndent: a || 0,
stack: []
}
},
token: function (a, b) {
if (b.tokenize == d && a.eatSpace()) return null;
var c = b.tokenize(a, b),
e = b.stack[b.stack.length - 1];
return "property" == c ? "propertyValue" == e ? c = o[a.current()] ? "string-2" : n[a.current()] ? "keyword" : "variable-2" : "rule" == e ? m[a.current()] || (c += " error") : e && "@media{" != e ? "@media" == e ? c = k[a.current()] ? "attribute" : /^(only|not)$/i.test(a.current()) ? "keyword" : "and" == a.current().toLowerCase() ? "error" : l[a.current()] ? "error" : "attribute error" : "@mediaType" == e ? c = k[a.current()] ? "attribute" : "and" == a.current().toLowerCase() ? "operator" : /^(only|not)$/i.test(a.current()) ? "error" : l[a.current()] ? "error" : "error" : "@mediaType(" == e ? m[a.current()] || (k[a.current()] ? c = "error" : "and" == a.current().toLowerCase() ? c = "operator" : /^(only|not)$/i.test(a.current()) ? c = "error" : c += " error") : c = "error" : c = "tag" : "atom" == c ? e && "@media{" != e ? "propertyValue" == e ? /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(a.current()) || (c += " error") : c = "error" : c = "builtin" : "@media" == e && "{" == i && (c = "error"), "{" == i ? "@media" == e || "@mediaType" == e ? (b.stack.pop(), b.stack[b.stack.length - 1] = "@media{") : b.stack.push("rule") : "}" == i ? (b.stack.pop(), "propertyValue" == e && b.stack.pop()) : "@media" == i ? b.stack.push("@media") : "@media" == e && /\b(keyword|attribute)\b/.test(c) ? b.stack.push("@mediaType") : "@mediaType" == e && "," == a.current() ? b.stack.pop() : "@mediaType" == e && "(" == i ? b.stack.push("@mediaType(") : "@mediaType(" == e && ")" == i ? b.stack.pop() : "rule" == e && ":" == i ? b.stack.push("propertyValue") : "propertyValue" == e && ";" == i && b.stack.pop(), c
},
indent: function (a, b) {
var c = a.stack.length;
return /^\}/.test(b) && (c -= "propertyValue" == a.stack[a.stack.length - 1] ? 2 : 1), a.baseIndent + c * j
},
electricChars: "}"
}
}), CodeMirror.defineMIME("text/css", "css"), CodeMirror.defineMode("javascript", function (a, b) {
function c(a, b, c) {
return b.tokenize = c, c(a, b)
}

function d(a, b) {
for (var c, d = !1; null != (c = a.next());) {
if (c == b && !d) return !1;
d = !d && "\\" == c
}
return d
}

function e(a, b, c) {
return M = a, N = c, b
}

function f(a, b) {
var f = a.next();
if ('"' == f || "'" == f) return c(a, b, g(f));
if (/[\[\]{}\(\),;\:\.]/.test(f)) return e(f);
if ("0" == f && a.eat(/x/i)) return a.eatWhile(/[\da-f]/i), e("number", "number");
if (/\d/.test(f) || "-" == f && a.eat(/\d/)) return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/), e("number", "number");
if ("/" == f) return a.eat("*") ? c(a, b, h) : a.eat("/") ? (a.skipToEnd(), e("comment", "comment")) : "operator" == b.lastType || "keyword c" == b.lastType || /^[\[{}\(,;:]$/.test(b.lastType) ? (d(a, "/"), a.eatWhile(/[gimy]/), e("regexp", "string-2")) : (a.eatWhile(S), e("operator", null, a.current()));
if ("#" == f) return a.skipToEnd(), e("error", "error");
if (S.test(f)) return a.eatWhile(S), e("operator", null, a.current());
a.eatWhile(/[\w\$_]/);
var i = a.current(),
j = R.propertyIsEnumerable(i) && R[i];
return j && "." != b.lastType ? e(j.type, j.style, i) : e("variable", "variable", i)
}

function g(a) {
return function (b, c) {
return d(b, a) || (c.tokenize = f), e("string", "string")
}
}

function h(a, b) {
for (var c, d = !1; c = a.next();) {
if ("/" == c && d) {
b.tokenize = f;
break
}
d = "*" == c
}
return e("comment", "comment")
}

function i(a, b, c, d, e, f) {
this.indented = a, this.column = b, this.type = c, this.prev = e, this.info = f, null != d && (this.align = d)
}

function j(a, b) {
for (var c = a.localVars; c; c = c.next)
if (c.name == b) return !0
}

function k(a, b, c, d, e) {
var f = a.cc;
for (U.state = a, U.stream = e, U.marked = null, U.cc = f, a.lexical.hasOwnProperty("align") || (a.lexical.align = !0);;) {
var g = f.length ? f.pop() : P ? u : t;
if (g(c, d)) {
for (; f.length && f[f.length - 1].lex;) f.pop()();
return U.marked ? U.marked : "variable" == c && j(a, d) ? "variable-2" : b
}
}
}

function l() {
for (var a = arguments.length - 1; a >= 0; a--) U.cc.push(arguments[a])
}

function m() {
return l.apply(null, arguments), !0
}

function n(a) {
function b(b) {
for (var c = b; c; c = c.next)
if (c.name == a) return !0;
return !1
}
var c = U.state;
if (c.context) {
if (U.marked = "def", b(c.localVars)) return;
c.localVars = {
name: a,
next: c.localVars
}
} else {
if (b(c.globalVars)) return;
c.globalVars = {
name: a,
next: c.globalVars
}
}
}

function o() {
U.state.context = {
prev: U.state.context,
vars: U.state.localVars
}, U.state.localVars = V
}

function p() {
U.state.localVars = U.state.context.vars, U.state.context = U.state.context.prev
}

function q(a, b) {
var c = function () {
var c = U.state;
c.lexical = new i(c.indented, U.stream.column(), a, null, c.lexical, b)
};
return c.lex = !0, c
}

function r() {
var a = U.state;
a.lexical.prev && (")" == a.lexical.type && (a.indented = a.lexical.indented), a.lexical = a.lexical.prev)
}

function s(a) {
return function (b) {
return b == a ? m() : ";" == a ? l() : m(arguments.callee)
}
}

function t(a) {
return "var" == a ? m(q("vardef"), E, s(";"), r) : "keyword a" == a ? m(q("form"), u, t, r) : "keyword b" == a ? m(q("form"), t, r) : "{" == a ? m(q("}"), B, r) : ";" == a ? m() : "function" == a ? m(K) : "for" == a ? m(q("form"), s("("), q(")"), G, s(")"), r, t, r) : "variable" == a ? m(q("stat"), x) : "switch" == a ? m(q("form"), u, q("}", "switch"), s("{"), B, r, r) : "case" == a ? m(u, s(":")) : "default" == a ? m(s(":")) : "catch" == a ? m(q("form"), o, s("("), L, s(")"), t, r, p) : l(q("stat"), u, s(";"), r)
}

function u(a) {
return T.hasOwnProperty(a) ? m(w) : "function" == a ? m(K) : "keyword c" == a ? m(v) : "(" == a ? m(q(")"), v, s(")"), r, w) : "operator" == a ? m(u) : "[" == a ? m(q("]"), A(u, "]"), r, w) : "{" == a ? m(q("}"), A(z, "}"), r, w) : m()
}

function v(a) {
return a.match(/[;\}\)\],]/) ? l() : l(u)
}

function w(a, b) {
if ("operator" == a) return /\+\+|--/.test(b) ? m(w) : "?" == b ? m(u, s(":"), u) : m(u);
if (";" != a) return "(" == a ? m(q(")"), A(u, ")"), r, w) : "." == a ? m(y, w) : "[" == a ? m(q("]"), u, s("]"), r, w) : void 0
}

function x(a) {
return ":" == a ? m(r, t) : l(w, s(";"), r)
}

function y(a) {
return "variable" == a ? (U.marked = "property", m()) : void 0
}

function z(a) {
return "variable" == a ? U.marked = "property" : ("number" == a || "string" == a) && (U.marked = a + " property"), T.hasOwnProperty(a) ? m(s(":"), u) : void 0
}

function A(a, b) {
function c(d) {
return "," == d ? m(a, c) : d == b ? m() : m(s(b))
}
return function (d) {
return d == b ? m() : l(a, c)
}
}

function B(a) {
return "}" == a ? m() : l(t, B)
}

function C(a) {
return ":" == a ? m(D) : l()
}

function D(a) {
return "variable" == a ? (U.marked = "variable-3", m()) : l()
}

function E(a, b) {
return "variable" == a ? (n(b), Q ? m(C, F) : m(F)) : l()
}

function F(a, b) {
return "=" == b ? m(u, F) : "," == a ? m(E) : void 0
}

function G(a) {
return "var" == a ? m(E, s(";"), I) : ";" == a ? m(I) : "variable" == a ? m(H) : m(I)
}

function H(a, b) {
return "in" == b ? m(u) : m(w, I)
}

function I(a, b) {
return ";" == a ? m(J) : "in" == b ? m(u) : m(u, s(";"), J)
}

function J(a) {
")" != a && m(u)
}

function K(a, b) {
return "variable" == a ? (n(b), m(K)) : "(" == a ? m(q(")"), o, A(L, ")"), r, t, p) : void 0
}

function L(a, b) {
return "variable" == a ? (n(b), Q ? m(C) : m()) : void 0
}
var M, N, O = a.indentUnit,
P = b.json,
Q = b.typescript,
R = function () {
function a(a) {
return {
type: a,
style: "keyword"
}
}
var b = a("keyword a"),
c = a("keyword b"),
d = a("keyword c"),
e = a("operator"),
f = {
type: "atom",
style: "atom"
}, g = {
"if": b,
"while": b,
"with": b,
"else": c,
"do": c,
"try": c,
"finally": c,
"return": d,
"break": d,
"continue": d,
"new": d,
"delete": d,
"throw": d,
"var": a("var"),
"const": a("var"),
let: a("var"),
"function": a("function"),
"catch": a("catch"),
"for": a("for"),
"switch": a("switch"),
"case": a("case"),
"default": a("default"),
"in": e,
"typeof": e,
"instanceof": e,
"true": f,
"false": f,
"null": f,
undefined: f,
NaN: f,
Infinity: f
};
if (Q) {
var h = {
type: "variable",
style: "variable-3"
}, i = {
"interface": a("interface"),
"class": a("class"),
"extends": a("extends"),
constructor: a("constructor"),
"public": a("public"),
"private": a("private"),
"protected": a("protected"),
"static": a("static"),
"super": a("super"),
string: h,
number: h,
bool: h,
any: h
};
for (var j in i) g[j] = i[j]
}
return g
}(),
S = /[+\-*&%=<>!?|]/,
T = {
atom: !0,
number: !0,
variable: !0,
string: !0,
regexp: !0
}, U = {
state: null,
column: null,
marked: null,
cc: null
}, V = {
name: "this",
next: {
name: "arguments"
}
};
return r.lex = !0, {
startState: function (a) {
return {
tokenize: f,
lastType: null,
cc: [],
lexical: new i((a || 0) - O, 0, "block", !1),
localVars: b.localVars,
globalVars: b.globalVars,
context: b.localVars && {
vars: b.localVars
},
indented: 0
}
},
token: function (a, b) {
if (a.sol() && (b.lexical.hasOwnProperty("align") || (b.lexical.align = !1), b.indented = a.indentation()), a.eatSpace()) return null;
var c = b.tokenize(a, b);
return "comment" == M ? c : (b.lastType = M, k(b, c, M, N, a))
},
indent: function (a, b) {
if (a.tokenize == h) return CodeMirror.Pass;
if (a.tokenize != f) return 0;
var c = b && b.charAt(0),
d = a.lexical;
"stat" == d.type && "}" == c && (d = d.prev);
var e = d.type,
g = c == e;
return "vardef" == e ? d.indented + ("operator" == a.lastType || "," == a.lastType ? 4 : 0) : "form" == e && "{" == c ? d.indented : "form" == e ? d.indented + O : "stat" == e ? d.indented + ("operator" == a.lastType || "," == a.lastType ? O : 0) : "switch" != d.info || g ? d.align ? d.column + (g ? 0 : 1) : d.indented + (g ? 0 : O) : d.indented + (/^(?:case|default)\b/.test(b) ? O : 2 * O)
},
electricChars: ":{}",
jsonMode: P
}
}), CodeMirror.defineMIME("text/javascript", "javascript"), CodeMirror.defineMIME("text/ecmascript", "javascript"), CodeMirror.defineMIME("application/javascript", "javascript"), CodeMirror.defineMIME("application/ecmascript", "javascript"), CodeMirror.defineMIME("application/json", {
name: "javascript",
json: !0
}), CodeMirror.defineMIME("text/typescript", {
name: "javascript",
typescript: !0
}), CodeMirror.defineMIME("application/typescript", {
name: "javascript",
typescript: !0
}), CodeMirror.defineMode("htmlmixed", function (a, b) {
function c(a, b) {
var c = b.htmlState.tagName,
d = g.token(a, b.htmlState);
if ("script" == c && /\btag\b/.test(d) && ">" == a.current()) {
var j = a.string.slice(Math.max(0, a.pos - 100), a.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);
j = j ? j[1] : "", j && /[\"\']/.test(j.charAt(0)) && (j = j.slice(1, j.length - 1));
for (var k = 0; k < i.length; ++k) {
var l = i[k];
if ("string" == typeof l.matches ? j == l.matches : l.matches.test(j)) {
l.mode && (b.token = e, b.localMode = l.mode, b.localState = l.mode.startState && l.mode.startState(g.indent(b.htmlState, "")));
break
}
}
} else "style" == c && /\btag\b/.test(d) && ">" == a.current() && (b.token = f, b.localMode = h, b.localState = h.startState(g.indent(b.htmlState, "")));
return d
}

function d(a, b, c) {
var d, e = a.current(),
f = e.search(b);
return f > -1 ? a.backUp(e.length - f) : (d = e.match(/<\/?$/)) && (a.backUp(e.length), a.match(b, !1) || a.match(e[0])), c
}

function e(a, b) {
return a.match(/^<\/\s*script\s*>/i, !1) ? (b.token = c, b.localState = b.localMode = null, c(a, b)) : d(a, /<\/\s*script\s*>/, b.localMode.token(a, b.localState))
}

function f(a, b) {
return a.match(/^<\/\s*style\s*>/i, !1) ? (b.token = c, b.localState = b.localMode = null, c(a, b)) : d(a, /<\/\s*style\s*>/, h.token(a, b.localState))
}
var g = CodeMirror.getMode(a, {
name: "xml",
htmlMode: !0
}),
h = CodeMirror.getMode(a, "css"),
i = [],
j = b && b.scriptTypes;
if (i.push({
matches: /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,
mode: CodeMirror.getMode(a, "javascript")
}), j)
for (var k = 0; k < j.length; ++k) {
var l = j[k];
i.push({
matches: l.matches,
mode: l.mode && CodeMirror.getMode(a, l.mode)
})
}
return i.push({
matches: /./,
mode: CodeMirror.getMode(a, "text/plain")
}), {
startState: function () {
var a = g.startState();
return {
token: c,
localMode: null,
localState: null,
htmlState: a
}
},
copyState: function (a) {
if (a.localState) var b = CodeMirror.copyState(a.localMode, a.localState);
return {
token: a.token,
localMode: a.localMode,
localState: b,
htmlState: CodeMirror.copyState(g, a.htmlState)
}
},
token: function (a, b) {
return b.token(a, b)
},
indent: function (a, b) {
return !a.localMode || /^\s*<\//.test(b) ? g.indent(a.htmlState, b) : a.localMode.indent ? a.localMode.indent(a.localState, b) : CodeMirror.Pass
},
electricChars: "/{}:",
innerMode: function (a) {
return {
state: a.localState || a.htmlState,
mode: a.localMode || g
}
}
}
}, "xml", "javascript", "css"), CodeMirror.defineMIME("text/html", "htmlmixed");
var _ = function () {
function a(b, c, d) {
if (b === c) return 0 !== b || 1 / b == 1 / c;
if (null == b || null == c) return b === c;
if (b._chain && (b = b._wrapped), c._chain && (c = c._wrapped), b.isEqual && x.isFunction(b.isEqual)) return b.isEqual(c);
if (c.isEqual && x.isFunction(c.isEqual)) return c.isEqual(b);
var e = j.call(b);
if (e != j.call(c)) return !1;
switch (e) {
case "[object String]":
return b == String(c);
case "[object Number]":
return b != +b ? c != +c : 0 == b ? 1 / b == 1 / c : b == +c;
case "[object Date]":
case "[object Boolean]":
return +b == +c;
case "[object RegExp]":
return b.source == c.source && b.global == c.global && b.multiline == c.multiline && b.ignoreCase == c.ignoreCase
}
if ("object" != typeof b || "object" != typeof c) return !1;
for (var f = d.length; f--;)
if (d[f] == b) return !0;
d.push(b);
var g = 0,
h = !0;
if ("[object Array]" == e) {
if (g = b.length, h = g == c.length)
for (; g-- && (h = g in b == g in c && a(b[g], c[g], d)););
} else {
if ("constructor" in b != "constructor" in c || b.constructor != c.constructor) return !1;
for (var i in b)
if (x.has(b, i) && (g++, !(h = x.has(c, i) && a(b[i], c[i], d)))) break;
if (h) {
for (i in c)
if (x.has(c, i) && !g--) break;
h = !g
}
}
return d.pop(), h
}
var b = this,
c = b._,
d = {}, e = Array.prototype,
f = Object.prototype,
g = Function.prototype,
h = e.slice,
i = e.unshift,
j = f.toString,
k = f.hasOwnProperty,
l = e.forEach,
m = e.map,
n = e.reduce,
o = e.reduceRight,
p = e.filter,
q = e.every,
r = e.some,
s = e.indexOf,
t = e.lastIndexOf,
u = Array.isArray,
v = Object.keys,
w = g.bind,
x = function (a) {
return new I(a)
};
"undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = x), exports._ = x) : b._ = x, x.VERSION = "1.3.3";
var y = x.each = x.forEach = function (a, b, c) {
if (null != a)
if (l && a.forEach === l) a.forEach(b, c);
else if (a.length === +a.length) {
for (var e = 0, f = a.length; f > e; e++)
if (e in a && b.call(c, a[e], e, a) === d) return
} else
for (var g in a)
if (x.has(a, g) && b.call(c, a[g], g, a) === d) return
};
x.map = x.collect = function (a, b, c) {
var d = [];
return null == a ? d : m && a.map === m ? a.map(b, c) : (y(a, function (a, e, f) {
d[d.length] = b.call(c, a, e, f)
}), a.length === +a.length && (d.length = a.length), d)
}, x.reduce = x.foldl = x.inject = function (a, b, c, d) {
var e = arguments.length > 2;
if (null == a && (a = []), n && a.reduce === n) return d && (b = x.bind(b, d)), e ? a.reduce(b, c) : a.reduce(b);
if (y(a, function (a, f, g) {
e ? c = b.call(d, c, a, f, g) : (c = a, e = !0)
}), !e) throw new TypeError("Reduce of empty array with no initial value");
return c
}, x.reduceRight = x.foldr = function (a, b, c, d) {
var e = arguments.length > 2;
if (null == a && (a = []), o && a.reduceRight === o) return d && (b = x.bind(b, d)), e ? a.reduceRight(b, c) : a.reduceRight(b);
var f = x.toArray(a).reverse();
return d && !e && (b = x.bind(b, d)), e ? x.reduce(f, b, c, d) : x.reduce(f, b)
}, x.find = x.detect = function (a, b, c) {
var d;
return z(a, function (a, e, f) {
return b.call(c, a, e, f) ? (d = a, !0) : void 0
}), d
}, x.filter = x.select = function (a, b, c) {
var d = [];
return null == a ? d : p && a.filter === p ? a.filter(b, c) : (y(a, function (a, e, f) {
b.call(c, a, e, f) && (d[d.length] = a)
}), d)
}, x.reject = function (a, b, c) {
var d = [];
return null == a ? d : (y(a, function (a, e, f) {
b.call(c, a, e, f) || (d[d.length] = a)
}), d)
}, x.every = x.all = function (a, b, c) {
var e = !0;
return null == a ? e : q && a.every === q ? a.every(b, c) : (y(a, function (a, f, g) {
return (e = e && b.call(c, a, f, g)) ? void 0 : d
}), !! e)
};
var z = x.some = x.any = function (a, b, c) {
b || (b = x.identity);
var e = !1;
return null == a ? e : r && a.some === r ? a.some(b, c) : (y(a, function (a, f, g) {
return e || (e = b.call(c, a, f, g)) ? d : void 0
}), !! e)
};
x.include = x.contains = function (a, b) {
var c = !1;
return null == a ? c : s && a.indexOf === s ? -1 != a.indexOf(b) : c = z(a, function (a) {
return a === b
})
}, x.invoke = function (a, b) {
var c = h.call(arguments, 2);
return x.map(a, function (a) {
return (x.isFunction(b) ? b || a : a[b]).apply(a, c)
})
}, x.pluck = function (a, b) {
return x.map(a, function (a) {
return a[b]
})
}, x.max = function (a, b, c) {
if (!b && x.isArray(a) && a[0] === +a[0]) return Math.max.apply(Math, a);
if (!b && x.isEmpty(a)) return -1 / 0;
var d = {
computed: -1 / 0
};
return y(a, function (a, e, f) {
var g = b ? b.call(c, a, e, f) : a;
g >= d.computed && (d = {
value: a,
computed: g
})
}), d.value
}, x.min = function (a, b, c) {
if (!b && x.isArray(a) && a[0] === +a[0]) return Math.min.apply(Math, a);
if (!b && x.isEmpty(a)) return 1 / 0;
var d = {
computed: 1 / 0
};
return y(a, function (a, e, f) {
var g = b ? b.call(c, a, e, f) : a;
g < d.computed && (d = {
value: a,
computed: g
})
}), d.value
}, x.shuffle = function (a) {
var b, c = [];
return y(a, function (a, d) {
b = Math.floor(Math.random() * (d + 1)), c[d] = c[b], c[b] = a
}), c
}, x.sortBy = function (a, b, c) {
var d = x.isFunction(b) ? b : function (a) {
return a[b]
};
return x.pluck(x.map(a, function (a, b, e) {
return {
value: a,
criteria: d.call(c, a, b, e)
}
}).sort(function (a, b) {
var c = a.criteria,
d = b.criteria;
return void 0 === c ? 1 : void 0 === d ? -1 : d > c ? -1 : c > d ? 1 : 0
}), "value")
}, x.groupBy = function (a, b) {
var c = {}, d = x.isFunction(b) ? b : function (a) {
return a[b]
};
return y(a, function (a, b) {
var e = d(a, b);
(c[e] || (c[e] = [])).push(a)
}), c
}, x.sortedIndex = function (a, b, c) {
c || (c = x.identity);
for (var d = 0, e = a.length; e > d;) {
var f = d + e >> 1;
c(a[f]) < c(b) ? d = f + 1 : e = f
}
return d
}, x.toArray = function (a) {
return a ? x.isArray(a) ? h.call(a) : x.isArguments(a) ? h.call(a) : a.toArray && x.isFunction(a.toArray) ? a.toArray() : x.values(a) : []
}, x.size = function (a) {
return x.isArray(a) ? a.length : x.keys(a).length
}, x.first = x.head = x.take = function (a, b, c) {
return null == b || c ? a[0] : h.call(a, 0, b)
}, x.initial = function (a, b, c) {
return h.call(a, 0, a.length - (null == b || c ? 1 : b))
}, x.last = function (a, b, c) {
return null == b || c ? a[a.length - 1] : h.call(a, Math.max(a.length - b, 0))
}, x.rest = x.tail = function (a, b, c) {
return h.call(a, null == b || c ? 1 : b)
}, x.compact = function (a) {
return x.filter(a, function (a) {
return !!a
})
}, x.flatten = function (a, b) {
return x.reduce(a, function (a, c) {
return x.isArray(c) ? a.concat(b ? c : x.flatten(c)) : (a[a.length] = c, a)
}, [])
}, x.without = function (a) {
return x.difference(a, h.call(arguments, 1))
}, x.uniq = x.unique = function (a, b, c) {
var d = c ? x.map(a, c) : a,
e = [];
return a.length < 3 && (b = !0), x.reduce(d, function (c, d, f) {
return (b ? x.last(c) === d && c.length : x.include(c, d)) || (c.push(d), e.push(a[f])), c
}, []), e
}, x.union = function () {
return x.uniq(x.flatten(arguments, !0))
}, x.intersection = x.intersect = function (a) {
var b = h.call(arguments, 1);
return x.filter(x.uniq(a), function (a) {
return x.every(b, function (b) {
return x.indexOf(b, a) >= 0
})
})
}, x.difference = function (a) {
var b = x.flatten(h.call(arguments, 1), !0);
return x.filter(a, function (a) {
return !x.include(b, a)
})
}, x.zip = function () {
for (var a = h.call(arguments), b = x.max(x.pluck(a, "length")), c = new Array(b), d = 0; b > d; d++) c[d] = x.pluck(a, "" + d);
return c
}, x.indexOf = function (a, b, c) {
if (null == a) return -1;
var d, e;
if (c) return d = x.sortedIndex(a, b), a[d] === b ? d : -1;
if (s && a.indexOf === s) return a.indexOf(b);
for (d = 0, e = a.length; e > d; d++)
if (d in a && a[d] === b) return d;
return -1
}, x.lastIndexOf = function (a, b) {
if (null == a) return -1;
if (t && a.lastIndexOf === t) return a.lastIndexOf(b);
for (var c = a.length; c--;)
if (c in a && a[c] === b) return c;
return -1
}, x.range = function (a, b, c) {
arguments.length <= 1 && (b = a || 0, a = 0), c = arguments[2] || 1;
for (var d = Math.max(Math.ceil((b - a) / c), 0), e = 0, f = new Array(d); d > e;) f[e++] = a, a += c;
return f
};
var A = function () {};
x.bind = function (a, b) {
var c, d;
if (a.bind === w && w) return w.apply(a, h.call(arguments, 1));
if (!x.isFunction(a)) throw new TypeError;
return d = h.call(arguments, 2), c = function () {
if (!(this instanceof c)) return a.apply(b, d.concat(h.call(arguments)));
A.prototype = a.prototype;
var e = new A,
f = a.apply(e, d.concat(h.call(arguments)));
return Object(f) === f ? f : e
}
}, x.bindAll = function (a) {
var b = h.call(arguments, 1);
return 0 == b.length && (b = x.functions(a)), y(b, function (b) {
a[b] = x.bind(a[b], a)
}), a
}, x.memoize = function (a, b) {
var c = {};
return b || (b = x.identity),
function () {
var d = b.apply(this, arguments);
return x.has(c, d) ? c[d] : c[d] = a.apply(this, arguments)
}
}, x.delay = function (a, b) {
var c = h.call(arguments, 2);
return setTimeout(function () {
return a.apply(null, c)
}, b)
}, x.defer = function (a) {
return x.delay.apply(x, [a, 1].concat(h.call(arguments, 1)))
}, x.throttle = function (a, b) {
var c, d, e, f, g, h, i = x.debounce(function () {
g = f = !1
}, b);
return function () {
c = this, d = arguments;
var j = function () {
e = null, g && a.apply(c, d), i()
};
return e || (e = setTimeout(j, b)), f ? g = !0 : h = a.apply(c, d), i(), f = !0, h
}
}, x.debounce = function (a, b, c) {
var d;
return function () {
var e = this,
f = arguments,
g = function () {
d = null, c || a.apply(e, f)
};
c && !d && a.apply(e, f), clearTimeout(d), d = setTimeout(g, b)
}
}, x.once = function (a) {
var b, c = !1;
return function () {
return c ? b : (c = !0, b = a.apply(this, arguments))
}
}, x.wrap = function (a, b) {
return function () {
var c = [a].concat(h.call(arguments, 0));
return b.apply(this, c)
}
}, x.compose = function () {
var a = arguments;
return function () {
for (var b = arguments, c = a.length - 1; c >= 0; c--) b = [a[c].apply(this, b)];
return b[0]
}
}, x.after = function (a, b) {
return 0 >= a ? b() : function () {
return --a < 1 ? b.apply(this, arguments) : void 0
}
}, x.keys = v || function (a) {
if (a !== Object(a)) throw new TypeError("Invalid object");
var b = [];
for (var c in a) x.has(a, c) && (b[b.length] = c);
return b
}, x.values = function (a) {
return x.map(a, x.identity)
}, x.functions = x.methods = function (a) {
var b = [];
for (var c in a) x.isFunction(a[c]) && b.push(c);
return b.sort()
}, x.extend = function (a) {
return y(h.call(arguments, 1), function (b) {
for (var c in b) a[c] = b[c]
}), a
}, x.pick = function (a) {
var b = {};
return y(x.flatten(h.call(arguments, 1)), function (c) {
c in a && (b[c] = a[c])
}), b
}, x.defaults = function (a) {
return y(h.call(arguments, 1), function (b) {
for (var c in b) null == a[c] && (a[c] = b[c])
}), a
}, x.clone = function (a) {
return x.isObject(a) ? x.isArray(a) ? a.slice() : x.extend({}, a) : a
}, x.tap = function (a, b) {
return b(a), a
}, x.isEqual = function (b, c) {
return a(b, c, [])
}, x.isEmpty = function (a) {
if (null == a) return !0;
if (x.isArray(a) || x.isString(a)) return 0 === a.length;
for (var b in a)
if (x.has(a, b)) return !1;
return !0
}, x.isElement = function (a) {
return !(!a || 1 != a.nodeType)
}, x.isArray = u || function (a) {
return "[object Array]" == j.call(a)
}, x.isObject = function (a) {
return a === Object(a)
}, x.isArguments = function (a) {
return "[object Arguments]" == j.call(a)
}, x.isArguments(arguments) || (x.isArguments = function (a) {
return !(!a || !x.has(a, "callee"))
}), x.isFunction = function (a) {
return "[object Function]" == j.call(a)
}, x.isString = function (a) {
return "[object String]" == j.call(a)
}, x.isNumber = function (a) {
return "[object Number]" == j.call(a)
}, x.isFinite = function (a) {
return x.isNumber(a) && isFinite(a)
}, x.isNaN = function (a) {
return a !== a
}, x.isBoolean = function (a) {
return a === !0 || a === !1 || "[object Boolean]" == j.call(a)
}, x.isDate = function (a) {
return "[object Date]" == j.call(a)
}, x.isRegExp = function (a) {
return "[object RegExp]" == j.call(a)
}, x.isNull = function (a) {
return null === a
}, x.isUndefined = function (a) {
return void 0 === a
}, x.has = function (a, b) {
return k.call(a, b)
}, x.noConflict = function () {
return b._ = c, this
}, x.identity = function (a) {
return a
}, x.times = function (a, b, c) {
for (var d = 0; a > d; d++) b.call(c, d)
}, x.escape = function (a) {
return ("" + a).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/\//g, "&#x2F;")
}, x.result = function (a, b) {
if (null == a) return null;
var c = a[b];
return x.isFunction(c) ? c.call(a) : c
}, x.mixin = function (a) {
y(x.functions(a), function (b) {
K(b, x[b] = a[b])
})
};
var B = 0;
x.uniqueId = function (a) {
var b = B++;
return a ? a + b : b
}, x.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var C = /.^/,
D = {
"\\": "\\",
"'": "'",
r: "\r",
n: "\n",
t: "	",
u2028: "\u2028",
u2029: "\u2029"
};
for (var E in D) D[D[E]] = E;
var F = /\\|'|\r|\n|\t|\u2028|\u2029/g,
G = /\\(\\|'|r|n|t|u2028|u2029)/g,
H = function (a) {
return a.replace(G, function (a, b) {
return D[b]
})
};
x.template = function (a, b, c) {
c = x.defaults(c || {}, x.templateSettings);
var d = "__p+='" + a.replace(F, function (a) {
return "\\" + D[a]
}).replace(c.escape || C, function (a, b) {
return "'+\n_.escape(" + H(b) + ")+\n'"
}).replace(c.interpolate || C, function (a, b) {
return "'+\n(" + H(b) + ")+\n'"
}).replace(c.evaluate || C, function (a, b) {
return "';\n" + H(b) + "\n;__p+='"
}) + "';\n";
c.variable || (d = "with(obj||{}){\n" + d + "}\n"), d = "var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n" + d + "return __p;\n";
var e = new Function(c.variable || "obj", "_", d);
if (b) return e(b, x);
var f = function (a) {
return e.call(this, a, x)
};
return f.source = "function(" + (c.variable || "obj") + "){\n" + d + "}", f
}, x.chain = function (a) {
return x(a).chain()
};
var I = function (a) {
this._wrapped = a
};
x.prototype = I.prototype;
var J = function (a, b) {
return b ? x(a).chain() : a
}, K = function (a, b) {
I.prototype[a] = function () {
var a = h.call(arguments);
return i.call(a, this._wrapped), J(b.apply(x, a), this._chain)
}
};
return x.mixin(x), y(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (a) {
var b = e[a];
I.prototype[a] = function () {
var c = this._wrapped;
b.apply(c, arguments);
var d = c.length;
return "shift" != a && "splice" != a || 0 !== d || delete c[0], J(c, this._chain)
}
}), y(["concat", "join", "slice"], function (a) {
var b = e[a];
I.prototype[a] = function () {
return J(b.apply(this._wrapped, arguments), this._chain)
}
}), I.prototype.chain = function () {
return this._chain = !0, this
}, I.prototype.value = function () {
return this._wrapped
}, x
}.call({}),
emmet = function (a) {
function b(a, b, c) {
var d;
return d = b && b.hasOwnProperty("constructor") ? b.constructor : function () {
a.apply(this, arguments)
}, _.extend(d, a), h.prototype = a.prototype, d.prototype = new h, b && _.extend(d.prototype, b), c && _.extend(d, c), d.prototype.constructor = d, d.__super__ = a.prototype, d
}

function c(a) {
return a in g || !i || i(a), g[a]
}
var d = "html",
e = "plain";
if ("undefined" == typeof _) try {
_ = a[["require"][0]]("underscore")
} catch (f) {}
if ("undefined" == typeof _) throw "Cannot access to Underscore.js lib";
var g = {
_: _
}, h = function () {}, i = null;
return {
define: function (a, b) {
a in g || (g[a] = _.isFunction(b) ? this.exec(b) : b)
},
require: c,
exec: function (b, d) {
return b.call(d || a, _.bind(c, this), _, this)
},
extend: function (a, c) {
var d = b(this, a, c);
return d.extend = this.extend, a.hasOwnProperty("toString") && (d.prototype.toString = a.toString), d
},
expandAbbreviation: function (a, b, e, f) {
if (!a) return "";
b = b || d;
var g = c("filters"),
h = c("abbreviationParser");
e = c("profile").get(e, b), c("tabStops").resetTabstopIndex();
var i = g.extractFromAbbreviation(a),
j = h.parse(i[0], {
syntax: b,
contextNode: f
}),
k = g.composeList(b, e, i[1]);
return g.apply(j, k, e), j.toString()
},
defaultSyntax: function () {
return d
},
defaultProfile: function () {
return e
},
log: function () {
a.console && a.console.log && a.console.log.apply(a.console, arguments)
},
setModuleLoader: function (a) {
i = a
}
}
}(this);
"undefined" != typeof exports && ("undefined" != typeof module && module.exports && (exports = module.exports = emmet), exports.emmet = emmet), "undefined" != typeof define && define(emmet), emmet.define("abbreviationParser", function (a, b) {
function c() {
this.parent = null, this.children = [], this._attributes = [], this.abbreviation = "", this.counter = 1, this._name = null, this._text = "", this.repeatCount = 1, this.hasImplicitRepeat = !1, this._data = {}, this.start = "", this.end = "", this.content = "", this.padding = ""
}

function d(a) {
return a.substring(1, a.length - 1)
}

function e(a, b) {
for (var c; c = a.next();) {
if (c === b) return !0
}
return !1
}

function f(e) {
e = a("utils").trim(e);
for (var g, h, i = new c, j = i.addChild(), k = a("stringStream").create(e), l = 1e3; !k.eol() && --l > 0;) switch (g = k.peek()) {
case "(":
if (k.start = k.pos, !k.skipToPair("(", ")")) throw 'Invalid abbreviation: mo matching ")" found for character at ' + k.pos;
var n = f(d(k.current()));
(h = k.match(/^\*(\d+)?/, !0)) && j._setRepeat(h[1]), b.each(n.children, function (a) {
j.addChild(a)
});
break;
case ">":
j = j.addChild(), k.next();
break;
case "+":
j = j.parent.addChild(), k.next();
break;
case "^":
var o = j.parent || j;
j = (o.parent || o).addChild(), k.next();
break;
default:
k.start = k.pos, k.eatWhile(function (a) {
if ("[" == a || "{" == a) {
if (k.skipToPair(a, p[a])) return k.backUp(1), !0;
throw 'Invalid abbreviation: mo matching "' + p[a] + '" found for character at ' + k.pos
}
if ("+" == a) {
k.next();
var b = k.eol() || ~"+>^*".indexOf(k.peek());
return k.backUp(1), b
}
return "(" != a && m(a)
}), j.setAbbreviation(k.current()), k.start = k.pos
}
if (1 > l) throw "Endless loop detected";
return i
}

function g(b) {
b = a("utils").trim(b);
var c = [],
d = a("stringStream").create(b);
for (d.eatSpace(); !d.eol() && (d.start = d.pos, d.eatWhile(o));) {
var f = d.current(),
g = "";
if ("=" == d.peek()) {
d.next(), d.start = d.pos;
var h = d.peek();
if ('"' == h || "'" == h) {
if (d.next(), !e(d, h)) throw "Invalid attribute value";
g = d.current(), g = g.substring(1, g.length - 1)
} else {
if (!d.eatWhile(/[^\s\]]/)) throw "Invalid attribute value";
g = d.current()
}
}
c.push({
name: f,
value: g
}), d.eatSpace()
}
return c
}

function h(b) {
for (var c = [], e = {
"#": "id",
".": "class"
}, f = null, h = a("stringStream").create(b); !h.eol();) switch (h.peek()) {
case "#":
case ".":
null === f && (f = h.pos);
var j = e[h.peek()];
h.next(), h.start = h.pos, h.eatWhile(o), c.push({
name: j,
value: h.current()
});
break;
case "[":
if (null === f && (f = h.pos), h.start = h.pos, !h.skipToPair("[", "]")) throw "Invalid attribute set definition";
c = c.concat(g(d(h.current())));
break;
default:
h.next()
}
return c.length ? {
element: b.substring(0, f),
attributes: i(c)
} : null
}

function i(a) {
a = b.map(a, function (a) {
return b.clone(a)
});
var c = {};
return b.filter(a, function (a) {
if (!(a.name in c)) return c[a.name] = a;
var b = c[a.name];
return "class" == a.name.toLowerCase() ? b.value += (b.value.length ? " " : "") + a.value : b.value = a.value, !1
})
}

function j(b) {
if (!~b.indexOf("{")) return null;
for (var c = a("stringStream").create(b); !c.eol();) switch (c.peek()) {
case "[":
case "(":
c.skipToPair(c.peek(), p[c.peek()]);
break;
case "{":
return c.start = c.pos, c.skipToPair("{", "}"), {
element: b.substring(0, c.start),
text: d(c.current())
};
default:
c.next()
}
}

function k(a) {
for (var c, d, e, f = a.children.length - 1; f >= 0; f--)
if (d = a.children[f], d.isRepeating())
for (e = c = d.repeatCount, d.repeatCount = 1, d.updateProperty("counter", 1), d.updateProperty("maxCount", e); --c > 0;) d.parent.addChild(d.clone(), f + 1).updateProperty("counter", c + 1).updateProperty("maxCount", e);
return b.each(a.children, k), a
}

function l(a) {
for (var c = a.children.length - 1; c >= 0; c--) {
var d = a.children[c];
d.isGroup() ? d.replace(l(d).children) : d.isEmpty() && d.remove()
}
return b.each(a.children, l), a
}

function m(a) {
var b = a.charCodeAt(0),
c = "#.*:$-_!@|%";
return b > 64 && 91 > b || b > 96 && 123 > b || b > 47 && 58 > b || -1 != c.indexOf(a)
}
var n = /^[\w\-\$\:@\!%]+\+?$/i,
o = /[\w\-:\$@]/,
p = {
"[": "]",
"(": ")",
"{": "}"
}, q = Array.prototype.splice,
r = [],
s = [],
t = [];
return c.prototype = {
addChild: function (a, d) {
return a = a || new c, a.parent = this, b.isUndefined(d) ? this.children.push(a) : this.children.splice(d, 0, a), a
},
clone: function () {
var a = new c,
d = ["abbreviation", "counter", "_name", "_text", "repeatCount", "hasImplicitRepeat", "start", "end", "content", "padding"];
return b.each(d, function (b) {
a[b] = this[b]
}, this), a._attributes = b.map(this._attributes, function (a) {
return b.clone(a)
}), a._data = b.clone(this._data), a.children = b.map(this.children, function (b) {
return b = b.clone(), b.parent = a, b
}), a
},
remove: function () {
return this.parent && (this.parent.children = b.without(this.parent.children, this)), this
},
replace: function () {
var a = this.parent,
c = b.indexOf(a.children, this),
d = b.flatten(arguments);
q.apply(a.children, [c, 1].concat(d)), b.each(d, function (b) {
b.parent = a
})
},
updateProperty: function (a, c) {
return this[a] = c, b.each(this.children, function (b) {
b.updateProperty(a, c)
}), this
},
find: function (a) {
return this.findAll(a)[0]
},
findAll: function (a) {
if (!b.isFunction(a)) {
var c = a.toLowerCase();
a = function (a) {
return a.name().toLowerCase() == c
}
}
var d = [];
return b.each(this.children, function (b) {
a(b) && d.push(b), d = d.concat(b.findAll(a))
}), b.compact(d)
},
data: function (b, c) {
return 2 == arguments.length && (this._data[b] = c, "resource" == b && a("elements").is(c, "snippet") && (this.content = c.data, this._text && (this.content = a("abbreviationUtils").insertChildContent(c.data, this._text)))), this._data[b]
},
name: function () {
var b = this.matchedResource();
return a("elements").is(b, "element") ? b.name : this._name
},
attributeList: function () {
var c = [],
d = this.matchedResource();
return a("elements").is(d, "element") && b.isArray(d.attributes) && (c = c.concat(d.attributes)), i(c.concat(this._attributes))
},
attribute: function (a, c) {
if (2 == arguments.length) {
var d = b.indexOf(b.pluck(this._attributes, "name"), a.toLowerCase());~
d ? this._attributes[d].value = c : this._attributes.push({
name: a,
value: c
})
}
return (b.find(this.attributeList(), function (b) {
return b.name == a
}) || {}).value
},
matchedResource: function () {
return this.data("resource")
},
index: function () {
return this.parent ? b.indexOf(this.parent.children, this) : -1
},
_setRepeat: function (a) {
a ? this.repeatCount = parseInt(a, 10) || 1 : this.hasImplicitRepeat = !0
},
setAbbreviation: function (a) {
a = a || "";
var b = this;
a = a.replace(/\*(\d+)?$/, function (a, c) {
return b._setRepeat(c), ""
}), this.abbreviation = a;
var c = j(a);
c && (a = c.element, this.content = this._text = c.text);
var d = h(a);
if (d && (a = d.element, this._attributes = d.attributes), this._name = a, this._name && !n.test(this._name)) throw "Invalid abbreviation"
},
toString: function () {
var c = a("utils"),
d = this.start,
e = this.end,
f = this.content,
g = this;
b.each(t, function (a) {
d = a(d, g, "start"), f = a(f, g, "content"), e = a(e, g, "end")
});
var h = b.map(this.children, function (a) {
return a.toString()
}).join("");
return f = a("abbreviationUtils").insertChildContent(f, h, {
keepVariable: !1
}), d + c.padString(f, this.padding) + e
},
hasEmptyChildren: function () {
return !!b.find(this.children, function (a) {
return a.isEmpty()
})
},
hasImplicitName: function () {
return !this._name && !this.isTextNode()
},
isGroup: function () {
return !this.abbreviation
},
isEmpty: function () {
return !this.abbreviation && !this.children.length
},
isRepeating: function () {
return this.repeatCount > 1 || this.hasImplicitRepeat
},
isTextNode: function () {
return !this.name() && !this.attributeList().length
},
isElement: function () {
return !this.isEmpty() && !this.isTextNode()
},
deepestChild: function () {
if (!this.children.length) return null;
for (var a = this; a.children.length;) a = b.last(a.children);
return a
}
}, t.push(function (b, c) {
return a("utils").replaceCounter(b, c.counter, c.maxCount)
}), {
parse: function (a, c) {
c = c || {};
var d = f(a);
if (c.contextNode) {
d._name = c.contextNode.name;
var e = {};
b.each(d._attributes, function (a) {
e[a.name] = a
}), b.each(c.contextNode.attributes, function (a) {
a.name in e ? e[a.name].value = a.value : (a = b.clone(a), d._attributes.push(a), e[a.name] = a)
})
}
return b.each(r, function (a) {
a(d, c)
}), d = l(k(d)), b.each(s, function (a) {
a(d, c)
}), d
},
AbbreviationNode: c,
addPreprocessor: function (a) {
b.include(r, a) || r.push(a)
},
removeFilter: function (a) {
preprocessor = b.without(r, a)
},
addPostprocessor: function (a) {
b.include(s, a) || s.push(a)
},
removePostprocessor: function (a) {
s = b.without(s, a)
},
addOutputProcessor: function (a) {
b.include(t, a) || t.push(a)
},
removeOutputProcessor: function (a) {
t = b.without(t, a)
},
isAllowedChar: function (a) {
return a = String(a), m(a) || ~">+^[](){}".indexOf(a)
}
}
}), emmet.exec(function (a, b) {
function c(d, e) {
var f = a("resources"),
g = a("elements"),
h = a("abbreviationParser");
b.each(b.clone(d.children), function (a) {
var d = f.getMatchedResource(a, e);
if (b.isString(d)) a.data("resource", g.create("snippet", d));
else if (g.is(d, "reference")) {
var i = h.parse(d.data, {
syntax: e
});
if (a.repeatCount > 1) {
var j = i.findAll(function (a) {
return a.hasImplicitRepeat
});
b.each(j, function (b) {
b.repeatCount = a.repeatCount, b.hasImplicitRepeat = !1
})
}
var k = i.deepestChild();
k && b.each(a.children, function (a) {
k.addChild(a)
}), b.each(i.children, function (c) {
b.each(a.attributeList(), function (a) {
c.attribute(a.name, a.value)
})
}), a.replace(i.children)
} else a.data("resource", d);
c(a, e)
})
}
a("abbreviationParser").addPreprocessor(function (a, b) {
var d = b.syntax || emmet.defaultSyntax();
c(a, d)
})
}), emmet.exec(function (a, b) {
function c(b) {
for (var c = a("range"), d = [], e = a("stringStream").create(b); !e.eol();) {
if ("\\" == e.peek()) e.next();
else if (e.start = e.pos, e.match(h, !0)) {
d.push(c.create(e.start, h));
continue
}
e.next()
}
return d
}

function d(d, e) {
var f = a("utils"),
g = c(d);
return g.reverse(), b.each(g, function (a) {
d = f.replaceSubstring(d, e, a)
}), d
}

function e(a) {
return c(a.content).length ? !0 : !! b.find(a.attributeList(), function (a) {
return !!c(a.value).length
})
}

function f(c, f, g) {
var h = c.findAll(function (a) {
return e(a)
});
if (e(c) && h.unshift(c), h.length) b.each(h, function (a) {
a.content = d(a.content, f), b.each(a._attributes, function (a) {
a.value = d(a.value, f)
})
});
else {
var i = c.deepestChild() || c;
i.content = g ? f : a("abbreviationUtils").insertChildContent(i.content, f)
}
}
var g = a("abbreviationParser"),
h = "$#";
g.addPreprocessor(function (c, d) {
if (d.pastedContent) {
var e = a("utils"),
f = b.map(e.splitByLines(d.pastedContent, !0), e.trim);
c.findAll(function (a) {
return a.hasImplicitRepeat ? (a.data("paste", f), a.repeatCount = f.length) : void 0
})
}
}), g.addPostprocessor(function (a, c) {
var d = a.findAll(function (a) {
var c = a.data("paste"),
d = "";
return b.isArray(c) ? d = c[a.counter - 1] : b.isFunction(c) ? d = c(a.counter - 1, a.content) : c && (d = c), d && f(a, d, !! a.data("pasteOverwrites")), a.data("paste", null), !! c
});
!d.length && c.pastedContent && f(a, c.pastedContent)
})
}), emmet.exec(function (a, b) {
function c(d) {
var e = a("tagName");
return b.each(d.children, function (a) {
(a.hasImplicitName() || a.data("forceNameResolving")) && (a._name = e.resolve(a.parent.name())), c(a)
}), d
}
a("abbreviationParser").addPostprocessor(c)
}), emmet.define("cssParser", function (a, b) {
function c(a) {
return "undefined" != typeof a
}

function d() {
return {
"char": p.chnum,
line: p.linenum
}
}

function e(a, b, d) {
var e = p,
f = d || {};
t.push({
charstart: c(f["char"]) ? f["char"] : e.chnum,
charend: c(f.charend) ? f.charend : e.chnum,
linestart: c(f.line) ? f.line : e.linenum,
lineend: c(f.lineend) ? f.lineend : e.linenum,
value: a,
type: b || a
})
}

function f(a, b) {
var d = p,
e = b || {}, f = c(e["char"]) ? e["char"] : d.chnum,
g = c(e.line) ? e.line : d.linenum;
return {
name: "ParseError",
message: a + " at line " + (g + 1) + " char " + (f + 1),
walker: d,
tokens: t
}
}

function g() {
for (var a = p.ch, b = "", c = d();
" " === a || "	" === a;) b += a, a = p.nextChar();
e(b, "white", c)
}

function h() {
var a, b = p,
c = b.ch,
f = c,
g = d();
if (a = b.nextChar(), "*" !== a) return g.charend = g["char"], g.lineend = g.line, e(f, f, g);
for (;
"*" !== c || "/" !== a;) f += a, c = a, a = b.nextChar();
f += a, b.nextChar(), e(f, "comment", g)
}

function i() {
var a, b = p,
c = b.ch,
g = c,
h = c,
i = d();
for (c = b.nextChar(); c !== g;) {
if ("\n" === c) {
if (a = b.nextChar(), "\\" !== a) throw f("Unterminated string", i);
h += c + a
} else h += "\\" === c ? c + b.nextChar() : c;
c = b.nextChar()
}
h += c, b.nextChar(), e(h, "string", i)
}

function j() {
var a = p,
b = a.ch,
c = 0,
g = b,
h = d();
for (b = a.nextChar();
")" !== b && !c;) {
if ("(" === b) c++;
else if (")" === b) c--;
else if (b === !1) throw f("Unterminated brace", h);
g += b, b = a.nextChar()
}
g += b, a.nextChar(), e(g, "brace", h)
}

function k(a) {
var b = p,
c = b.ch,
f = d(),
g = a ? a + c : c;
for (c = b.nextChar(), a && (f["char"] -= a.length); r(c) || s(c);) g += c, c = b.nextChar();
e(g, "identifier", f)
}

function l() {
var a, b = p,
c = b.ch,
f = d(),
g = c,
h = "." === g;
if (c = b.nextChar(), a = !s(c), h && a) return f.charend = f["char"], f.lineend = f.line, e(g, ".", f);
if ("-" === g && a) return k("-");
for (; c !== !1 && (s(c) || !h && "." === c);) "." === c && (h = !0), g += c, c = b.nextChar();
e(g, "number", f)
}

function m() {
var a = p,
b = a.ch,
c = d(),
f = b,
g = a.nextChar();
return "=" === g && q(f, !0) ? (f += g, e(f, "match", c), a.nextChar(), void 0) : (c.charend = c["char"] + 1, c.lineend = c.line, e(f, f, c), void 0)
}

function n() {
var a = p.ch;
if (" " === a || "	" === a) return g();
if ("/" === a) return h();
if ('"' === a || "'" === a) return i();
if ("(" === a) return j();
if ("-" === a || "." === a || s(a)) return l();
if (r(a)) return k();
if (q(a)) return m();
if ("\n" === a) return e("line"), p.nextChar(), void 0;
throw f("Unrecognized character")
}

function o(a, b) {
return "\r" == a.charAt(b) && "\n" == a.charAt(b + 1) ? "\r\n" : a.charAt(b)
}
var p, q, r, s, t = [];
return p = {
lines: null,
total_lines: 0,
linenum: -1,
line: "",
ch: "",
chnum: -1,
init: function (a) {
var b = p;
b.lines = a.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n"), b.total_lines = b.lines.length, b.chnum = -1, b.linenum = -1, b.ch = "", b.line = "", b.nextLine(), b.nextChar()
},
nextLine: function () {
var a = this;
return a.linenum += 1, a.line = a.total_lines <= a.linenum ? !1 : a.lines[a.linenum], -1 !== a.chnum && (a.chnum = 0), a.line
},
nextChar: function () {
var a = this;
for (a.chnum += 1;
"" === a.line.charAt(a.chnum);) return this.nextLine() === !1 ? (a.ch = !1, !1) : (a.chnum = -1, a.ch = "\n", "\n");
return a.ch = a.line.charAt(a.chnum), a.ch
},
peek: function () {
return this.line.charAt(this.chnum + 1)
}
}, r = function (a) {
return "&" == a || "_" === a || "-" === a || a >= "a" && "z" >= a || a >= "A" && "Z" >= a
}, s = function (a) {
return a !== !1 && a >= "0" && "9" >= a
}, q = function () {
for (var a = "{}[]()+*=.,;:>~|\\%$#@^!".split(""), b = "*^|$~".split(""), c = {}, d = {}, e = 0; e < a.length; e += 1) c[a[e]] = !0;
for (e = 0; e < b.length; e += 1) d[b[e]] = !0;
return function (a, b) {
return b ? !! d[a] : !! c[a]
}
}(), {
lex: function (a) {
for (p.init(a), t = []; p.ch !== !1;) n();
return t
},
parse: function (a) {
var c = 0;
return b.map(this.lex(a), function (b) {
return "line" == b.type && (b.value = o(a, c)), {
type: b.type,
start: c,
end: c += b.value.length
}
})
},
toSource: function (a) {
for (var b, c = 0, d = a.length, e = ""; d > c; c += 1) b = a[c], e += "line" === b.type ? "\n" : b.value;
return e
}
}
}), emmet.define("xmlParser", function (a) {
function b(a, b) {
function d(c) {
return b.tokenize = c, c(a, b)
}
var g = a.next();
if ("<" == g) {
if (a.eat("!")) return a.eat("[") ? a.match("CDATA[") ? d(e("atom", "]]>")) : null : a.match("--") ? d(e("comment", "-->")) : a.match("DOCTYPE", !0, !0) ? (a.eatWhile(/[\w\._\-]/), d(f(1))) : null;
if (a.eat("?")) return a.eatWhile(/[\w\._\-]/), b.tokenize = e("meta", "?>"), "meta";
x = a.eat("/") ? "closeTag" : "openTag", a.eatSpace(), w = "";
for (var h; h = a.eat(/[^\s\u00a0=<>\"\'\/?]/);) w += h;
return b.tokenize = c, "tag"
}
if ("&" == g) {
var i;
return i = a.eat("#") ? a.eat("x") ? a.eatWhile(/[a-fA-F\d]/) && a.eat(";") : a.eatWhile(/[\d]/) && a.eat(";") : a.eatWhile(/[\w\.\-:]/) && a.eat(";"), i ? "atom" : "error"
}
return a.eatWhile(/[^&<]/), "text"
}

function c(a, c) {
var e = a.next();
return ">" == e || "/" == e && a.eat(">") ? (c.tokenize = b, x = ">" == e ? "endTag" : "selfcloseTag", "tag") : "=" == e ? (x = "equals", null) : /[\'\"]/.test(e) ? (c.tokenize = d(e), c.tokenize(a, c)) : (a.eatWhile(/[^\s\u00a0=<>\"\'\/?]/), "word")
}

function d(a) {
return function (b, d) {
for (; !b.eol();)
if (b.next() == a) {
d.tokenize = c;
break
}
return "string"
}
}

function e(a, c) {
return function (d, e) {
for (; !d.eol();) {
if (d.match(c)) {
e.tokenize = b;
break
}
d.next()
}
return a
}
}

function f(a) {
return function (c, d) {
for (var e; null != (e = c.next());) {
if ("<" == e) return d.tokenize = f(a + 1), d.tokenize(c, d);
if (">" == e) {
if (1 == a) {
d.tokenize = b;
break
}
return d.tokenize = f(a - 1), d.tokenize(c, d)
}
}
return "meta"
}
}

function g() {
for (var a = arguments.length - 1; a >= 0; a--) y.cc.push(arguments[a])
}

function h() {
return g.apply(null, arguments), !0
}

function i(a, b) {
var c = v.doNotIndent.hasOwnProperty(a) || y.context && y.context.noIndent;
y.context = {
prev: y.context,
tagName: a,
indent: y.indented,
startOfLine: b,
noIndent: c
}
}

function j() {
y.context && (y.context = y.context.prev)
}

function k(a) {
if ("openTag" == a) return y.tagName = w, h(o, l(y.startOfLine));
if ("closeTag" == a) {
var b = !1;
return y.context ? y.context.tagName != w && (v.implicitlyClosed.hasOwnProperty(y.context.tagName.toLowerCase()) && j(), b = !y.context || y.context.tagName != w) : b = !0, b && (u = "error"), h(m(b))
}
return h()
}

function l(a) {
return function (b) {
return "selfcloseTag" == b || "endTag" == b && v.autoSelfClosers.hasOwnProperty(y.tagName.toLowerCase()) ? (n(y.tagName.toLowerCase()), h()) : "endTag" == b ? (n(y.tagName.toLowerCase()), i(y.tagName, a), h()) : h()
}
}

function m(a) {
return function (b) {
return a && (u = "error"), "endTag" == b ? (j(), h()) : (u = "error", h(arguments.callee))
}
}

function n(a) {
for (var b;;) {
if (!y.context) return;
if (b = y.context.tagName.toLowerCase(), !v.contextGrabbers.hasOwnProperty(b) || !v.contextGrabbers[b].hasOwnProperty(a)) return;
j()
}
}

function o(a) {
return "word" == a ? (u = "attribute", h(p, o)) : "endTag" == a || "selfcloseTag" == a ? g() : (u = "error", h(o))
}

function p(a) {
return "equals" == a ? h(q, o) : (v.allowMissing || (u = "error"), "endTag" == a || "selfcloseTag" == a ? g() : h())
}

function q(a) {
return "string" == a ? h(r) : "word" == a && v.allowUnquoted ? (u = "string", h()) : (u = "error", "endTag" == a || "selfCloseTag" == a ? g() : h())
}

function r(a) {
return "string" == a ? h(r) : g()
}

function s() {
return {
tokenize: b,
cc: [],
indented: 0,
startOfLine: !0,
tagName: null,
context: null
}
}

function t(a, b) {
if (a.sol() && (b.startOfLine = !0, b.indented = 0), a.eatSpace()) return null;
u = x = w = null;
var c = b.tokenize(a, b);
if (b.type = x, (c || x) && "comment" != c)
for (y = b;;) {
var d = b.cc.pop() || k;
if (d(x || c)) break
}
return b.startOfLine = !1, u || c
}
var u, v = {
autoSelfClosers: {},
implicitlyClosed: {},
contextGrabbers: {},
doNotIndent: {},
allowUnquoted: !0,
allowMissing: !0
}, w = null,
x = null,
y = null;
return {
parse: function (b, c) {
c = c || 0;
for (var d = s(), e = a("stringStream").create(b), f = []; !e.eol();) f.push({
type: t(e, d),
start: e.start + c,
end: e.pos + c
}), e.start = e.pos;
return f
}
}
}), emmet.define("string-score", function () {
return {
score: function (a, b, c) {
if (a == b) return 1;
if ("" == b) return 0;
for (var d, e, f, g, h, i, j, k, l, m = 0, n = b.length, o = a.length, p = 1, q = 0; n > q; ++q) {
if (i = b.charAt(q), j = a.indexOf(i.toLowerCase()), k = a.indexOf(i.toUpperCase()), l = Math.min(j, k), h = l > -1 ? l : Math.max(j, k), -1 === h) {
if (c) {
p += 1 - c;
continue
}
return 0
}
g = .1, a[h] === i && (g += .1), 0 === h ? (g += .6, 0 === q && (d = 1)) : " " === a.charAt(h - 1) && (g += .8), a = a.substring(h + 1, o), m += g
}
return e = m / n, f = (e * (n / o) + e) / 2, f /= p, d && 1 > f + .15 && (f += .15), f
}
}
}), emmet.define("utils", function (a, b) {
function c(a) {
this._data = [], this.length = 0, a && this.append(a)
}
var d = "${0}";
return c.prototype = {
append: function (a) {
this._data.push(a), this.length += a.length
},
toString: function () {
return this._data.join("")
},
valueOf: function () {
return this.toString()
}
}, {
reTag: /<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,
endsWithTag: function (a) {
return this.reTag.test(a)
},
isNumeric: function (a) {
return "string" == typeof a && (a = a.charCodeAt(0)), a && a > 47 && 58 > a
},
trim: function (a) {
return (a || "").replace(/^\s+|\s+$/g, "")
},
getNewline: function () {
var c = a("resources");
if (!c) return "\n";
var d = c.getVariable("newline");
return b.isString(d) ? d : "\n"
},
setNewline: function (b) {
var c = a("resources");
c.setVariable("newline", b), c.setVariable("nl", b)
},
splitByLines: function (a, c) {
var d = this.getNewline(),
e = (a || "").replace(/\r\n/g, "\n").replace(/\n\r/g, "\n").replace(/\r/g, "\n").replace(/\n/g, d).split(d);
return c && (e = b.filter(e, function (a) {
return a.length && !! this.trim(a)
}, this)), e
},
normalizeNewline: function (a) {
return this.splitByLines(a).join(this.getNewline())
},
repeatString: function (a, b) {
for (var c = [], d = 0; b > d; d++) c.push(a);
return c.join("")
},
getStringsPads: function (a) {
var c = b.map(a, function (a) {
return b.isString(a) ? a.length : +a
}),
d = b.max(c);
return b.map(c, function (a) {
var b = d - a;
return b ? this.repeatString(" ", b) : ""
}, this)
},
padString: function (c, d) {
var e = b.isNumber(d) ? this.repeatString(a("resources").getVariable("indentation") || "	", d) : d,
f = [],
g = this.splitByLines(c),
h = this.getNewline();
f.push(g[0]);
for (var i = 1; i < g.length; i++) f.push(h + e + g[i]);
return f.join("")
},
zeroPadString: function (a, b) {
for (var c = "", d = a.length; b > d++;) c += "0";
return c + a
},
unindentString: function (a, b) {
for (var c = this.splitByLines(a), d = 0; d < c.length; d++) 0 == c[d].search(b) && (c[d] = c[d].substr(b.length));
return c.join(this.getNewline())
},
replaceUnescapedSymbol: function (a, c, d) {
for (var e = 0, f = a.length, g = c.length, h = 0; f > e;)
if ("\\" == a.charAt(e)) e += g + 1;
else if (a.substr(e, g) == c) {
var i = g;
h++;
var j = d;
if (b.isFunction(d)) {
var k = d(a, c, e, h);
k ? (i = k[0].length, j = k[1]) : j = !1
}
if (j === !1) {
e++;
continue
}
a = a.substring(0, e) + j + a.substring(e + i), f = a.length, e += j.length
} else e++;
return a
},
replaceVariables: function (c, d) {
d = d || {};
var e = b.isFunction(d) ? d : function (a, b) {
return b in d ? d[b] : null
}, f = a("resources");
return a("tabStops").processText(c, {
variable: function (a) {
var c = e(a.token, a.name, a);
return null === c && (c = f.getVariable(a.name)), (null === c || b.isUndefined(c)) && (c = a.token), c
}
})
},
replaceCounter: function (a, c, d) {
var e = "$";
a = String(a), c = String(c), /^\-?\d+$/.test(c) && (c = +c);
var f = this;
return this.replaceUnescapedSymbol(a, e, function (a, e, g) {
if ("{" == a.charAt(g + 1) || f.isNumeric(a.charAt(g + 1))) return !1;
for (var h = g + 1;
"$" == a.charAt(h) && "{" != a.charAt(h + 1);) h++;
var i, j = h - g,
k = 0,
l = !1;
return (i = a.substr(h).match(/^@(\-?)(\d*)/)) && (h += i[0].length, i[1] && (l = !0), k = parseInt(i[2] || 1) - 1), l && d && b.isNumber(c) && (c = d - c + 1), c += k, [a.substring(g, h), f.zeroPadString(c + "", j)]
})
},
matchesTag: function (a) {
return this.reTag.test(a || "")
},
escapeText: function (a) {
return a.replace(/([\$\\])/g, "\\$1")
},
unescapeText: function (a) {
return a.replace(/\\(.)/g, "$1")
},
getCaretPlaceholder: function () {
return b.isFunction(d) ? d.apply(this, arguments) : d
},
setCaretPlaceholder: function (a) {
d = a
},
getLinePadding: function (a) {
return (a.match(/^(\s+)/) || [""])[0]
},
getLinePaddingFromPosition: function (a, b) {
var c = this.findNewlineBounds(a, b);
return this.getLinePadding(c.substring(a))
},
escapeForRegexp: function (a) {
var b = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g");
return a.replace(b, "\\$&")
},
prettifyNumber: function (a, b) {
return a.toFixed("undefined" == typeof b ? 2 : b).replace(/\.?0+$/, "")
},
stringBuilder: function (a) {
return new c(a)
},
replaceSubstring: function (a, c, d, e) {
return b.isObject(d) && "end" in d && (e = d.end, d = d.start), b.isString(e) && (e = d + e.length), b.isUndefined(e) && (e = d), 0 > d || d > a.length ? a : a.substring(0, d) + c + a.substring(e)
},
narrowToNonSpace: function (b, c, d) {
for (var e = a("range").create(c, d), f = /[\s\n\r\u00a0]/; e.start < e.end && f.test(b.charAt(e.start));) e.start++;
for (; e.end > e.start;)
if (e.end--, !f.test(b.charAt(e.end))) {
e.end++;
break
}
return e
},
findNewlineBounds: function (b, c) {
for (var d = b.length, e = 0, f = d - 1, g = c - 1; g > 0; g--) {
var h = b.charAt(g);
if ("\n" == h || "\r" == h) {
e = g + 1;
break
}
}
for (var i = c; d > i; i++) {
var h = b.charAt(i);
if ("\n" == h || "\r" == h) {
f = i;
break
}
}
return a("range").create(e, f - e)
},
deepMerge: function () {
var a, c, d, e, f, g, h = arguments[0] || {}, i = 1,
j = arguments.length;
for (b.isObject(h) || b.isFunction(h) || (h = {}); j > i; i++)
if (null != (a = arguments[i]))
for (c in a) d = h[c], e = a[c], h !== e && (e && (b.isObject(e) || (f = b.isArray(e))) ? (f ? (f = !1, g = d && b.isArray(d) ? d : []) : g = d && b.isObject(d) ? d : {}, h[c] = this.deepMerge(g, e)) : void 0 !== e && (h[c] = e));
return h
}
}
}), emmet.define("range", function (a, b) {
function c(a, b, c) {
switch (c) {
case "eq":
case "==":
return a === b;
case "lt":
case "<":
return b > a;
case "lte":
case "<=":
return b >= a;
case "gt":
case ">":
return a > b;
case "gte":
case ">=":
return a >= b
}
}

function d(a, c) {
b.isObject(a) && "start" in a ? (this.start = Math.min(a.start, a.end), this.end = Math.max(a.start, a.end)) : b.isArray(a) ? (this.start = a[0], this.end = a[1]) : (c = b.isString(c) ? c.length : +c, this.start = a, this.end = a + c)
}
return d.prototype = {
length: function () {
return Math.abs(this.end - this.start)
},
equal: function (a) {
return this.cmp(a, "eq", "eq")
},
shift: function (a) {
return this.start += a, this.end += a, this
},
overlap: function (a) {
return a.start <= this.end && a.end >= this.start
},
intersection: function (a) {
if (this.overlap(a)) {
var b = Math.max(a.start, this.start),
c = Math.min(a.end, this.end);
return new d(b, c - b)
}
return null
},
union: function (a) {
if (this.overlap(a)) {
var b = Math.min(a.start, this.start),
c = Math.max(a.end, this.end);
return new d(b, c - b)
}
return null
},
inside: function (a) {
return this.cmp(a, "lte", "gt")
},
contains: function (a) {
return this.cmp(a, "lt", "gt")
},
include: function () {
return this.cmp(loc, "lte", "gte")
},
cmp: function (a, b, e) {
var f, g;
return a instanceof d ? (f = a.start, g = a.end) : f = g = a, c(this.start, f, b || "<=") && c(this.end, g, e || ">")
},
substring: function (a) {
return this.length() > 0 ? a.substring(this.start, this.end) : ""
},
clone: function () {
return new d(this.start, this.length())
},
toArray: function () {
return [this.start, this.end]
},
toString: function () {
return "{" + this.start + ", " + this.length() + "}"
}
}, {
create: function (a, c) {
return b.isUndefined(a) || null === a ? null : a instanceof d ? a : (b.isObject(a) && "start" in a && "end" in a && (c = a.end - a.start, a = a.start), new d(a, c))
},
create2: function (a, c) {
return b.isNumber(a) && b.isNumber(c) && (c -= a), this.create(a, c)
}
}
}), emmet.define("handlerList", function (a, b) {
function c() {
this._list = []
}
return c.prototype = {
add: function (a, c) {
this._list.push(b.extend({
order: 0
}, c || {}, {
fn: a
}))
},
remove: function (a) {
this._list = b.without(this._list, b.find(this._list, function (b) {
return b.fn === a
}))
},
list: function () {
return b.sortBy(this._list, "order").reverse()
},
listFn: function () {
return b.pluck(this.list(), "fn")
},
exec: function (a, c) {
c = c || [];
var d = null;
return b.find(this.list(), function (b) {
return d = b.fn.apply(b, c), d !== a ? !0 : void 0
}), d
}
}, {
create: function () {
return new c
}
}
}), emmet.define("tokenIterator", function (a, b) {
function c(a) {
this.tokens = a, this._position = 0, this.reset()
}
return c.prototype = {
next: function () {
if (this.hasNext()) {
var a = this.tokens[++this._i];
return this._position = a.start, a
}
return null
},
current: function () {
return this.tokens[this._i]
},
position: function () {
return this._position
},
hasNext: function () {
return this._i < this._il - 1
},
reset: function () {
this._i = -1, this._il = this.tokens.length
},
item: function () {
return this.tokens[this._i]
},
itemNext: function () {
return this.tokens[this._i + 1]
},
itemPrev: function () {
return this.tokens[this._i - 1]
},
nextUntil: function (a, c) {
for (var d, e = b.isString(a) ? function (b) {
return b.type == a
} : a;
(d = this.next()) && (c && c.call(this, d), !e.call(this, d)););
}
}, {
create: function (a) {
return new c(a)
}
}
}), emmet.define("stringStream", function () {
function a(a) {
this.pos = this.start = 0, this.string = a
}
return a.prototype = {
eol: function () {
return this.pos >= this.string.length
},
sol: function () {
return 0 == this.pos
},
peek: function () {
return this.string.charAt(this.pos)
},
next: function () {
return this.pos < this.string.length ? this.string.charAt(this.pos++) : void 0
},
eat: function (a) {
var b, c = this.string.charAt(this.pos);
return b = "string" == typeof a ? c == a : c && (a.test ? a.test(c) : a(c)), b ? (++this.pos, c) : void 0
},
eatWhile: function (a) {
for (var b = this.pos; this.eat(a););
return this.pos > b
},
eatSpace: function () {
for (var a = this.pos;
/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;
return this.pos > a
},
skipToEnd: function () {
this.pos = this.string.length
},
skipTo: function (a) {
var b = this.string.indexOf(a, this.pos);
return b > -1 ? (this.pos = b, !0) : void 0
},
skipToPair: function (a, b) {
for (var c, d = 0, e = this.pos, f = this.string.length; f > e;)
if (c = this.string.charAt(e++), c == a) d++;
else if (c == b && (d--, 1 > d)) return this.pos = e, !0;
return !1
},
backUp: function (a) {
this.pos -= a
},
match: function (a, b, c) {
if ("string" != typeof a) {
var d = this.string.slice(this.pos).match(a);
return d && b !== !1 && (this.pos += d[0].length), d
}
var e = c ? function (a) {
return a.toLowerCase()
} : function (a) {
return a
};
return e(this.string).indexOf(e(a), this.pos) == this.pos ? (b !== !1 && (this.pos += a.length), !0) : void 0
},
current: function () {
return this.string.slice(this.start, this.pos)
}
}, {
create: function (b) {
return new a(b)
}
}
}), emmet.define("resources", function (a, b) {
function c(b) {
var c = a("utils");
return c.replaceUnescapedSymbol(b, "|", c.getCaretPlaceholder())
}

function d(b, d, f) {
return d = c(d), "snippets" == f ? a("elements").create("snippet", d) : "abbreviations" == f ? e(b, d) : void 0
}

function e(b, c) {
b = a("utils").trim(b);
var d, e = a("elements");
return (d = j.exec(c)) ? e.create("element", d[1], d[2], "/" == d[4]) : e.create("reference", c)
}

function f(a) {
return a.replace(/:$/, "").replace(/:/g, "-")
}
var g = "system",
h = "user",
i = {}, j = /^<(\w+\:?[\w\-]*)((?:\s+[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/,
k = {}, l = {}, m = a("handlerList").create();
return {
setVocabulary: function (a, b) {
i = {}, b == g ? k = a : l = a
},
getVocabulary: function (a) {
return a == g ? k : l
},
getMatchedResource: function (a, c) {
return m.exec(null, b.toArray(arguments)) || this.findSnippet(c, a.name())
},
getVariable: function (a) {
return (this.getSection("variables") || {})[a]
},
setVariable: function (a, b) {
var c = this.getVocabulary("user") || {};
"variables" in c || (c.variables = {}), c.variables[a] = b, this.setVocabulary(c, "user")
},
hasSyntax: function (a) {
return a in this.getVocabulary(h) || a in this.getVocabulary(g)
},
addResolver: function (a, b) {
m.add(a, b)
},
removeResolver: function (a) {
m.remove(a)
},
getSection: function (c) {
if (!c) return null;
c in i || (i[c] = a("utils").deepMerge({}, k[c], l[c]));
for (var d, e = i[c], f = b.rest(arguments); e && (d = f.shift());) {
if (!(d in e)) return null;
e = e[d]
}
return e
},
findItem: function (a, b) {
for (var c = this.getSection(a); c;) {
if (b in c) return c[b];
c = this.getSection(c["extends"])
}
},
findSnippet: function (a, c, e) {
if (!a || !c) return null;
e = e || [];
var f = [c];~
c.indexOf("-") && f.push(c.replace(/\-/g, ":"));
var g = this.getSection(a),
h = null;
return b.find(["snippets", "abbreviations"], function (c) {
var e = this.getSection(a, c);
return e ? b.find(f, function (a) {
return e[a] ? h = d(a, e[a], c) : void 0
}) : void 0
}, this), e.push(a), h || !g["extends"] || b.include(e, g["extends"]) ? h : this.findSnippet(g["extends"], c, e)
},
fuzzyFindSnippet: function (c, d, e) {
e = e || .3;
var g = this.getAllSnippets(c),
h = a("string-score");
d = f(d);
var i = b.map(g, function (a, b) {
return {
key: b,
score: h.score(a.nk, d, .1)
}
}),
j = b.last(b.sortBy(i, "score"));
if (j && j.score >= e) {
var k = j.key;
return g[k].parsedValue
}
},
getAllSnippets: function (a) {
var c = "all-" + a;
if (!i[c]) {
var e = [],
g = a,
h = [];
do {
var j = this.getSection(g);
if (!j) break;
b.each(["snippets", "abbreviations"], function (a) {
var c = {};
b.each(j[a] || null, function (b, e) {
c[e] = {
nk: f(e),
value: b,
parsedValue: d(e, b, a),
type: a
}
}), e.push(c)
}), h.push(g), g = j["extends"]
} while (g && !b.include(h, g));
i[c] = b.extend.apply(b, e.reverse())
}
return i[c]
}
}
}), emmet.define("actions", function (a, b) {
function c(b) {
return a("utils").trim(b.charAt(0).toUpperCase() + b.substring(1).replace(/_[a-z]/g, function (a) {
return " " + a.charAt(1).toUpperCase()
}))
}
var d = {};
return {
add: function (a, b, e) {
a = a.toLowerCase(), e = e || {}, e.label || (e.label = c(a)), d[a] = {
name: a,
fn: b,
options: e
}
},
get: function (a) {
return d[a.toLowerCase()]
},
run: function (a, c) {
b.isArray(c) || (c = b.rest(arguments));
var d = this.get(a);
return d ? d.fn.apply(emmet, c) : (emmet.log('Action "%s" is not defined', a), !1)
},
getAll: function () {
return d
},
getList: function () {
return b.values(this.getAll())
},
getMenu: function (a) {
var d = [];
return a = a || [], b.each(this.getList(), function (e) {
if (!e.options.hidden && !b.include(a, e.name)) {
var f = c(e.name),
g = d;
if (e.options.label) {
var h = e.options.label.split("/");
f = h.pop();
for (var i, j; i = h.shift();) j = b.find(g, function (a) {
return "submenu" == a.type && a.name == i
}), j || (j = {
name: i,
type: "submenu",
items: []
}, g.push(j)), g = j.items
}
g.push({
type: "action",
name: e.name,
label: f
})
}
}), d
},
getActionNameForMenuTitle: function (a, c) {
var d = null;
return b.find(c || this.getMenu(), function (b) {
return "action" != b.type ? d = this.getActionNameForMenuTitle(a, b.items) : b.label == a || b.name == a ? d = b.name : void 0
}, this), d || null
}
}
}), emmet.define("profile", function (a, b) {
function c(a) {
b.extend(this, h, a)
}

function d(a, b) {
switch (String(b || "").toLowerCase()) {
case "lower":
return a.toLowerCase();
case "upper":
return a.toUpperCase()
}
return a
}

function e(a, b) {
return g[a.toLowerCase()] = new c(b)
}

function f() {
e("xhtml"), e("html", {
self_closing_tag: !1
}), e("xml", {
self_closing_tag: !0,
tag_nl: !0
}), e("plain", {
tag_nl: !1,
indent: !1,
place_cursor: !1
}), e("line", {
tag_nl: !1,
indent: !1,
extraFilters: "s"
})
}
var g = {}, h = {
tag_case: "asis",
attr_case: "asis",
attr_quotes: "double",
tag_nl: "decide",
tag_nl_leaf: !1,
place_cursor: !0,
indent: !0,
inline_break: 3,
self_closing_tag: "xhtml",
filters: "",
extraFilters: ""
};
return c.prototype = {
tagName: function (a) {
return d(a, this.tag_case)
},
attributeName: function (a) {
return d(a, this.attr_case)
},
attributeQuote: function () {
return "single" == this.attr_quotes ? "'" : '"'
},
selfClosing: function () {
return "xhtml" == this.self_closing_tag ? " /" : this.self_closing_tag === !0 ? "/" : ""
},
cursor: function () {
return this.place_cursor ? a("utils").getCaretPlaceholder() : ""
}
}, f(), {
create: function (a, d) {
return 2 == arguments.length ? e(a, d) : new c(b.defaults(a || {}, h))
},
get: function (d, e) {
if (!d && e) {
var f = a("resources").findItem(e, "profile");
f && (d = f)
}
return d ? d instanceof c ? d : b.isString(d) && d.toLowerCase() in g ? g[d.toLowerCase()] : this.create(d) : g.plain
},
remove: function (a) {
a = (a || "").toLowerCase(), a in g && delete g[a]
},
reset: function () {
g = {}, f()
},
stringCase: d
}
}), emmet.define("editorUtils", function (a) {
return {
isInsideTag: function (a, b) {
for (var c = /^<\/?\w[\w\:\-]*.*?>/, d = b; d > -1 && "<" != a.charAt(d);) d--;
if (-1 != d) {
var e = c.exec(a.substring(d));
if (e && b > d && b < d + e[0].length) return !0
}
return !1
},
outputInfo: function (a, b, c) {
return c = c || a.getProfileName(), {
syntax: String(b || a.getSyntax()),
profile: c ? String(c) : null,
content: String(a.getContent())
}
},
unindent: function (b, c) {
return a("utils").unindentString(c, this.getCurrentLinePadding(b))
},
getCurrentLinePadding: function (b) {
return a("utils").getLinePadding(b.getCurrentLine())
}
}
}), emmet.define("actionUtils", function (a) {
return {
mimeTypes: {
gif: "image/gif",
png: "image/png",
jpg: "image/jpeg",
jpeg: "image/jpeg",
svg: "image/svg+xml",
html: "text/html",
htm: "text/html"
},
extractAbbreviation: function (b) {
for (var c = b.length, d = -1, e = 0, f = 0, g = 0, h = a("utils"), i = a("abbreviationParser");;) {
if (c--, 0 > c) {
d = 0;
break
}
var j = b.charAt(c);
if ("]" == j) f++;
else if ("[" == j) {
if (!f) {
d = c + 1;
break
}
f--
} else if ("}" == j) g++;
else if ("{" == j) {
if (!g) {
d = c + 1;
break
}
g--
} else if (")" == j) e++;
else if ("(" == j) {
if (!e) {
d = c + 1;
break
}
e--
} else {
if (f || g) continue;
if (!i.isAllowedChar(j) || ">" == j && h.endsWithTag(b.substring(0, c + 1))) {
d = c + 1;
break
}
}
}
return -1 == d || g || f || e ? "" : b.substring(d).replace(/^[\*\+\>\^]+/, "")
},
getImageSize: function (a) {
var b = "PNG\r\n\n",
c = "ÿØ",
d = "GIF8",
e = function () {
return a.charCodeAt(f++)
};
if (a.substr(0, 8) === b) {
var f = a.indexOf("IHDR") + 4;
return {
width: e() << 24 | e() << 16 | e() << 8 | e(),
height: e() << 24 | e() << 16 | e() << 8 | e()
}
}
if (a.substr(0, 4) === d) return f = 6, {
width: e() | e() << 8,
height: e() | e() << 8
};
if (a.substr(0, 2) === c) {
f = 2;
for (var g = a.length; g > f;) {
if (255 != e()) return;
var h = e();
if (218 == h) break;
var i = e() << 8 | e();
if (!(!(h >= 192 && 207 >= h) || 4 & h || 8 & h)) return f += 1, {
height: e() << 8 | e(),
width: e() << 8 | e()
};
f += i - 2
}
}
},
captureContext: function (b) {
var c = {
html: 1,
xml: 1,
xsl: 1
}, d = String(b.getSyntax());
if (d in c) {
var e = String(b.getContent()),
f = a("htmlMatcher").find(e, b.getCaretPos());
if (f && "tag" == f.type) {
for (var g, h = /([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, i = f.open, j = i.range.substring(e).replace(/^<[\w\-\:]+/, ""), k = {
name: i.name,
attributes: []
}; g = h.exec(j);) k.attributes.push({
name: g[1],
value: g[2]
});
return k
}
}
return null
},
findExpressionBounds: function (b, c) {
for (var d = String(b.getContent()), e = d.length, f = b.getCaretPos() - 1, g = f + 1; f >= 0 && c(d.charAt(f), f, d);) f--;
for (; e > g && c(d.charAt(g), g, d);) g++;
return g > f ? a("range").create([++f, g]) : void 0
},
compoundUpdate: function (a, b) {
if (b) {
var c = a.getSelectionRange();
return a.replaceContent(b.data, b.start, b.end, !0), a.createSelection(b.caret, b.caret + c.end - c.start), !0
}
return !1
},
detectSyntax: function (b, c) {
var d = c || "html";
return a("resources").hasSyntax(d) || (d = "html"), "html" == d && (this.isStyle(b) || this.isInlineCSS(b)) && (d = "css"), d
},
detectProfile: function (b) {
var c = b.getSyntax(),
d = a("resources").findItem(c, "profile");
if (d) return d;
switch (c) {
case "xml":
case "xsl":
return "xml";
case "css":
if (this.isInlineCSS(b)) return "line";
break;
case "html":
var d = a("resources").getVariable("profile");
return d || (d = this.isXHTML(b) ? "xhtml" : "html"), d
}
return "xhtml"
},
isXHTML: function (a) {
return -1 != a.getContent().search(/<!DOCTYPE[^>]+XHTML/i)
},
isStyle: function (b) {
var c = String(b.getContent()),
d = b.getCaretPos(),
e = a("htmlMatcher").tag(c, d);
return e && "style" == e.open.name.toLowerCase() && e.innerRange.cmp(d, "lte", "gte")
},
isInlineCSS: function (b) {
var c = String(b.getContent()),
d = b.getCaretPos(),
e = a("xmlEditTree").parseFromPosition(c, d, !0);
if (e) {
var f = e.itemFromPosition(d, !0);
return f && "style" == f.name().toLowerCase() && f.valueRange(!0).cmp(d, "lte", "gte")
}
return !1
}
}
}), emmet.define("abbreviationUtils", function (a, b) {
return {
isSnippet: function (b) {
return a("elements").is(b.matchedResource(), "snippet")
},
isUnary: function (b) {
var c = b.matchedResource();
return b.children.length || this.isSnippet(b) ? !1 : c && c.is_empty || a("tagName").isEmptyElement(b.name())
},
isInline: function (b) {
return b.isTextNode() || !b.name() || a("tagName").isInlineLevel(b.name())
},
isBlock: function (a) {
return this.isSnippet(a) || !this.isInline(a)
},
isSnippet: function (b) {
return a("elements").is(b.matchedResource(), "snippet")
},
hasTagsInContent: function (b) {
return a("utils").matchesTag(b.content)
},
hasBlockChildren: function (a) {
return this.hasTagsInContent(a) && this.isBlock(a) || b.any(a.children, function (a) {
return this.isBlock(a)
}, this)
},
insertChildContent: function (c, d, e) {
e = b.extend({
keepVariable: !0,
appendIfNoChild: !0
}, e || {});
var f = !1,
g = a("utils");
return c = g.replaceVariables(c, function (a, b, h) {
var i = a;
return "child" == b && (i = g.padString(d, g.getLinePaddingFromPosition(c, h.start)), f = !0, e.keepVariable && (i += a)), i
}), !f && e.appendIfNoChild && (c += d), c
}
}
}), emmet.define("base64", function () {
var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
return {
encode: function (b) {
for (var c, d, e, f, g, h, i, j, k, l, m = [], n = 0, o = b.length, p = a; o > n;) j = b.charCodeAt(n++), k = b.charCodeAt(n++), l = b.charCodeAt(n++), c = 255 & j, d = 255 & k, e = 255 & l, f = c >> 2, g = (3 & c) << 4 | d >> 4, h = (15 & d) << 2 | e >> 6, i = 63 & e, isNaN(k) ? h = i = 64 : isNaN(l) && (i = 64), m.push(p.charAt(f) + p.charAt(g) + p.charAt(h) + p.charAt(i));
return m.join("")
},
decode: function (b) {
var c, d, e, f, g, h, i, j, k = 0,
l = 0,
m = [],
n = a,
o = b.length;
if (!b) return b;
b += "";
do f = n.indexOf(b.charAt(k++)), g = n.indexOf(b.charAt(k++)), h = n.indexOf(b.charAt(k++)), i = n.indexOf(b.charAt(k++)), j = f << 18 | g << 12 | h << 6 | i, c = 255 & j >> 16, d = 255 & j >> 8, e = 255 & j, m[l++] = 64 == h ? String.fromCharCode(c) : 64 == i ? String.fromCharCode(c, d) : String.fromCharCode(c, d, e); while (o > k);
return m.join("")
}
}
}), emmet.define("htmlMatcher", function (a, b) {
function c(b, c) {
return {
name: c[1],
selfClose: !! c[3],
range: a("range").create(b, c[0]),
type: "open"
}
}

function d(b, c) {
return {
name: c[1],
range: a("range").create(b, c[0]),
type: "close"
}
}

function e(c, d) {
return {
range: a("range").create(c, b.isNumber(d) ? d - c : d[0]),
type: "comment"
}
}

function f(a) {
var b, e = {};
return {
open: function (a) {
var b = this.matches(a);
return b && "open" == b.type ? b : null
},
close: function (a) {
var b = this.matches(a);
return b && "close" == b.type ? b : null
},
matches: function (f) {
var g = "p" + f;
if (!(g in e) && "<" == a.charAt(f)) {
var h = a.slice(f);
e[g] = (b = h.match(i)) ? c(f, b) : (b = h.match(j)) ? d(f, b) : !1
}
return e[g]
},
text: function () {
return a
}
}
}

function g(a, b, c) {
return a.substring(b, b + c.length) == c
}

function h(a, c) {
for (var d = [], e = null, f = c.text(), h = a.range.end, i = f.length; i > h; h++) {
if (g(f, h, "<!--"))
                for (var j = h; i > j; j++)
                    if (g(f, j, "-->")) {
h = j + 3;
break
}
if (e = c.matches(h))
if ("open" != e.type || e.selfClose) {
if ("close" == e.type) {
if (!d.length) return e.name == a.name ? e : null;
if (b.last(d) == e.name) d.pop();
else {
for (var k = !1; d.length && !k;) {
var l = d.pop();
l == e.name && (k = !0)
}
if (!d.length && !k) return e.name == a.name ? e : null
}
}
} else d.push(e.name)
}
}
var i = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
j = /^<\/([\w\:\-]+)[^>]*>/;
return {
find: function (b, c) {
for (var d = a("range"), i = f(b), j = null, k = null, l = c; l >= 0; l--)
if (j = i.open(l)) {
if (j.selfClose) {
if (j.range.cmp(c, "lt", "gt")) break;
continue
}
if (k = h(j, i)) {
var m = d.create2(j.range.start, k.range.end);
if (m.contains(c)) break
} else if (j.range.contains(c)) break;
j = null
} else if (g(b, l, "-->")) {
for (var n = l - 1; n >= 0 && !g(b, n, "-->"); n--)
if (g(b, n, "<!--")) {
                        l = n;
                        break
                    }
            } else if (g(b, l, "<!--")) {
                for (var n = l + 4, o = b.length; o > n; n++)
                    if (g(b, n, "-->")) {
n += 3;
break
}
j = e(l, n);
break
}
if (j) {
var p = null,
q = null;
if (k ? (p = d.create2(j.range.start, k.range.end), q = d.create2(j.range.end, k.range.start)) : p = q = d.create2(j.range.start, j.range.end), "comment" == j.type) {
var r = p.substring(b);
q.start += r.length - r.replace(/^<\!--\s*/, "").length, q.end -= r.length - r.replace(/\s*-->$/, "").length
}
return {
open: j,
close: k,
type: "comment" == j.type ? "comment" : "tag",
innerRange: q,
innerContent: function () {
return this.innerRange.substring(b)
},
outerRange: p,
outerContent: function () {
return this.outerRange.substring(b)
},
range: q.length() && q.cmp(c, "lte", "gte") ? q : p,
content: function () {
return this.range.substring(b)
},
source: b
}
}
},
tag: function (a, b) {
var c = this.find(a, b);
return c && "tag" == c.type ? c : void 0
}
}
}), emmet.define("tabStops", function (a, b) {
var c = 100,
d = 0,
e = {
replaceCarets: !1,
escape: function (a) {
return "\\" + a
},
tabstop: function (a) {
return a.token
},
variable: function (a) {
return a.token
}
};
return a("abbreviationParser").addOutputProcessor(function (b, c) {
var e = 0,
f = a("tabStops"),
g = a("utils"),
h = {
tabstop: function (a) {
var b = parseInt(a.group);
if (0 == b) return "${0}";
if (b > e && (e = b), a.placeholder) {
var c = b + d,
g = f.processText(a.placeholder, h);
return "${" + c + ":" + g + "}"
}
return "${" + (b + d) + "}"
}
};
return b = f.processText(b, h), b = g.replaceVariables(b, f.variablesResolver(c)), d += e + 1, b
}), {
extract: function (c, d) {
var f = a("utils"),
g = {
carets: ""
}, h = [];
d = b.extend({}, e, d, {
tabstop: function (a) {
var b = a.token,
c = "";
return "cursor" == a.placeholder ? h.push({
start: a.start,
end: a.start + b.length,
group: "carets",
value: ""
}) : ("placeholder" in a && (g[a.group] = a.placeholder), a.group in g && (c = g[a.group]), h.push({
start: a.start,
end: a.start + b.length,
group: a.group,
value: c
})), b
}
}), d.replaceCarets && (c = c.replace(new RegExp(f.escapeForRegexp(f.getCaretPlaceholder()), "g"), "${0:cursor}")), c = this.processText(c, d);
var i = f.stringBuilder(),
j = 0,
k = b.map(h, function (a) {
i.append(c.substring(j, a.start));
var b = i.length,
d = g[a.group] || "";
return i.append(d), j = a.end, {
group: a.group,
start: b,
end: b + d.length
}
});
return i.append(c.substring(j)), {
text: i.toString(),
tabstops: b.sortBy(k, "start")
}
},
processText: function (c, d) {
d = b.extend({}, e, d);
for (var f, g, h, i = a("utils").stringBuilder(), j = a("stringStream").create(c); f = j.next();)
if ("\\" != f || j.eol()) {
if (h = f, "$" == f)
if (j.start = j.pos - 1, g = j.match(/^[0-9]+/)) h = d.tabstop({
start: i.length,
group: j.current().substr(1),
token: j.current()
});
else if (g = j.match(/^\{([a-z_\-][\w\-]*)\}/)) h = d.variable({
start: i.length,
name: g[1],
token: j.current()
});
else if (g = j.match(/^\{([0-9]+)(:.+?)?\}/, !1)) {
j.skipToPair("{", "}");
var k = {
start: i.length,
group: g[1],
token: j.current()
}, l = k.token.substring(k.group.length + 2, k.token.length - 1);
l && (k.placeholder = l.substr(1)), h = d.tabstop(k)
}
i.append(h)
} else i.append(d.escape(j.next()));
return i.toString()
},
upgrade: function (a, c) {
var d = 0,
e = {
tabstop: function (a) {
var b = parseInt(a.group);
return b > d && (d = b), a.placeholder ? "${" + (b + c) + ":" + a.placeholder + "}" : "${" + (b + c) + "}"
}
};
return b.each(["start", "end", "content"], function (b) {
a[b] = this.processText(a[b], e)
}, this), d
},
variablesResolver: function (d) {
var e = {}, f = a("resources");
return function (g, h) {
if ("child" == h) return g;
if ("cursor" == h) return a("utils").getCaretPlaceholder();
var i = d.attribute(h);
if (!b.isUndefined(i) && i !== g) return i;
var j = f.getVariable(h);
return j ? j : (e[h] || (e[h] = c++), "${" + e[h] + ":" + h + "}")
}
},
resetTabstopIndex: function () {
d = 0, c = 100
}
}
}), emmet.define("preferences", function (a, b) {
function c(a) {
return b.isString(a) ? (a = a.toLowerCase(), "yes" == a || "true" == a || "1" == a) : !! a
}

function d(a) {
return b.isObject(a) && "value" in a && b.keys(a).length < 3
}
var e = {}, f = {}, g = null,
h = null;
return {
define: function (a, c, e) {
var g = a;
b.isString(a) && (g = {}, g[a] = {
value: c,
description: e
}), b.each(g, function (a, b) {
f[b] = d(a) ? a : {
value: a
}
})
},
set: function (a, d) {
var g = a;
b.isString(a) && (g = {}, g[a] = d), b.each(g, function (a, b) {
if (!(b in f)) throw 'Property "' + b + '" is not defined. You should define it first with `define` method of current module';
if (a !== f[b].value) {
switch (typeof f[b].value) {
case "boolean":
a = c(a);
break;
case "number":
a = parseInt(a + "", 10) || 0;
break;
default:
a += ""
}
e[b] = a
} else b in e && delete e[b]
})
},
get: function (a) {
return a in e ? e[a] : a in f ? f[a].value : void 0
},
getArray: function (c) {
var d = this.get(c);
return b.isUndefined(d) || (d = b.map(d.split(","), a("utils").trim), d.length || (d = null)), d
},
getDict: function (a) {
var c = {};
return b.each(this.getArray(a), function (a) {
var b = a.split(":");
c[b[0]] = b[1]
}), c
},
description: function (a) {
return a in f ? f[a].description : void 0
},
remove: function (a) {
b.isArray(a) || (a = [a]), b.each(a, function (a) {
a in e && delete e[a], a in f && delete f[a]
})
},
list: function () {
return b.map(b.keys(f).sort(), function (a) {
return {
name: a,
value: this.get(a),
type: typeof f[a].value,
description: f[a].description
}
}, this)
},
load: function (a) {
b.each(a, function (a, b) {
this.set(b, a)
}, this)
},
exportModified: function () {
return b.clone(e)
},
reset: function () {
e = {}
},
_startTest: function () {
g = f, h = e, f = {}, e = {}
},
_stopTest: function () {
f = g, e = h
}
}
}), emmet.define("filters", function (a, b) {
function c(a) {
return a ? b.isString(a) ? a.split(/[\|,]/g) : a : []
}
var d = {}, e = "html";
return {
add: function (a, b) {
d[a] = b
},
apply: function (e, f, g) {
var h = a("utils");
return g = a("profile").get(g), b.each(c(f), function (a) {
var b = h.trim(a.toLowerCase());
b && b in d && (e = d[b](e, g))
}), e
},
composeList: function (b, d, f) {
d = a("profile").get(d);
var g = c(d.filters || a("resources").findItem(b, "filters") || e);
return d.extraFilters && (g = g.concat(c(d.extraFilters))), f && (g = g.concat(c(f))), g && g.length || (g = c(e)), g
},
extractFromAbbreviation: function (a) {
var b = "";
return a = a.replace(/\|([\w\|\-]+)$/, function (a, c) {
return b = c, ""
}), [a, c(b)]
}
}
}), emmet.define("elements", function (a, b) {
function c(a) {
return {
data: a
}
}
var d = {}, e = /([\w\-]+)\s*=\s*(['"])(.*?)\2/g,
f = {
add: function (a, b) {
var c = this;
d[a] = function () {
var d = b.apply(c, arguments);
return d && (d.type = a), d
}
},
get: function (a) {
return d[a]
},
create: function (a) {
var b = [].slice.call(arguments, 1),
c = this.get(a);
return c ? c.apply(this, b) : null
},
is: function (a, b) {
return a && a.type === b
}
};
return f.add("element", function (a, c, d) {
var f = {
name: a,
is_empty: !! d
};
if (c)
if (f.attributes = [], b.isArray(c)) f.attributes = c;
else if (b.isString(c))
for (var g; g = e.exec(c);) f.attributes.push({
name: g[1],
value: g[3]
});
else b.each(c, function (a, b) {
f.attributes.push({
name: b,
value: a
})
});
return f
}), f.add("snippet", c), f.add("reference", c), f.add("empty", function () {
return {}
}), f
}), emmet.define("editTree", function (a, b, c) {
function d(a, c) {
this.options = b.extend({
offset: 0
}, c), this.source = a, this._children = [], this._positions = {
name: 0
}, this.initialize.apply(this, arguments)
}

function e(a, b, c) {
this.parent = a, this._name = b.value, this._value = c ? c.value : "", this._positions = {
name: b.start,
value: c ? c.start : -1
}, this.initialize.apply(this, arguments)
}
var f = a("range").create;
return d.extend = c.extend, d.prototype = {
initialize: function () {},
_updateSource: function (c, d, e) {
var g = f(d, b.isUndefined(e) ? 0 : e - d),
h = c.length - g.length(),
i = function (a) {
b.each(a, function (b, c) {
b >= g.end && (a[c] += h)
})
};
i(this._positions), b.each(this.list(), function (a) {
i(a._positions)
}), this.source = a("utils").replaceSubstring(this.source, c, g)
},
add: function (a, b) {
var c = new e(a, b);
return this._children.push(c), c
},
get: function (a) {
return b.isNumber(a) ? this.list()[a] : b.isString(a) ? b.find(this.list(), function (b) {
return b.name() === a
}) : a
},
getAll: function (a) {
b.isArray(a) || (a = [a]);
var c = [],
d = [];
return b.each(a, function (a) {
b.isString(a) ? c.push(a) : b.isNumber(a) && d.push(a)
}), b.filter(this.list(), function (a, e) {
return b.include(d, e) || b.include(c, a.name())
})
},
value: function (a, c, d) {
var e = this.get(a);
return e ? e.value(c) : b.isUndefined(c) ? void 0 : this.add(a, c, d)
},
values: function (a) {
return b.map(this.getAll(a), function (a) {
return a.value()
})
},
remove: function (a) {
var c = this.get(a);
c && (this._updateSource("", c.fullRange()), this._children = b.without(this._children, c))
},
list: function () {
return this._children
},
indexOf: function (a) {
return b.indexOf(this.list(), this.get(a))
},
name: function (a) {
return b.isUndefined(a) || this._name === (a = String(a)) || (this._updateSource(a, this._positions.name, this._positions.name + this._name.length), this._name = a), this._name
},
nameRange: function (a) {
return f(this._positions.name + (a ? this.options.offset : 0), this.name())
},
range: function (a) {
return f(a ? this.options.offset : 0, this.toString())
},
itemFromPosition: function (a, c) {
return b.find(this.list(), function (b) {
return b.range(c).inside(a)
})
},
toString: function () {
return this.source
}
}, e.extend = c.extend, e.prototype = {
initialize: function () {},
_pos: function (a, b) {
return a + (b ? this.parent.options.offset : 0)
},
value: function (a) {
return b.isUndefined(a) || this._value === (a = String(a)) || (this.parent._updateSource(a, this.valueRange()), this._value = a), this._value
},
name: function (a) {
return b.isUndefined(a) || this._name === (a = String(a)) || (this.parent._updateSource(a, this.nameRange()), this._name = a), this._name
},
namePosition: function (a) {
return this._pos(this._positions.name, a)
},
valuePosition: function (a) {
return this._pos(this._positions.value, a)
},
range: function (a) {
return f(this.namePosition(a), this.toString())
},
fullRange: function (a) {
return this.range(a)
},
nameRange: function (a) {
return f(this.namePosition(a), this.name())
},
valueRange: function (a) {
return f(this.valuePosition(a), this.value())
},
toString: function () {
return this.name() + this.value()
},
valueOf: function () {
return this.toString()
}
}, {
EditContainer: d,
EditElement: e,
createToken: function (a, b, c) {
var d = {
start: a || 0,
value: b || "",
type: c
};
return d.end = d.start + d.value.length, d
}
}
}), emmet.define("cssEditTree", function (a, b) {
function c(b, c) {
return a("range").create(b, c)
}

function d(a, c) {
c = c || j | k;
var d = ["white", "line"];
if ((c & k) == k)
for (; a.length && b.include(d, b.last(a).type);) a.pop();
if ((c & j) == j)
for (; a.length && b.include(d, a[0].type);) a.shift();
return a
}

function e(a) {
for (var e, f, g = [], h = a.position();
(e = a.next()) && "{" != e.type;) g.push(e);
return d(g), g.length ? (h = g[0].start, f = b.last(g).end) : f = h, c(h, f - h)
}

function f(a) {
var e, f, g, h = ["white", "line", ":"],
i = [];
for (a.nextUntil(function () {
return !b.include(h, this.itemNext().type)
}), f = a.current().end; e = a.next();) {
if ("}" == e.type || ";" == e.type) return d(i, j | ("}" == e.type ? k : 0)), i.length ? (f = i[0].start, g = b.last(i).end) : g = f, c(f, g - f);
i.push(e)
}
return i.length ? c(i[0].start, b.last(i).end - i[0].start) : void 0
}

function g(d) {
var e, f = a("stringStream").create(d),
g = [],
h = /[\s\u00a0,]/,
i = function () {
f.next(), g.push(c(f.start, f.current())), f.start = f.pos
};
for (f.eatSpace(), f.start = f.pos; e = f.next();)
if ('"' == e || "'" == e) {
if (f.next(), !f.skipTo(e)) break;
i()
} else if ("(" == e) {
if (f.backUp(1), !f.skipToPair("(", ")")) break;
f.backUp(1), i()
} else h.test(e) && (g.push(c(f.start, f.current().length - 1)), f.eatWhile(h), f.start = f.pos);
return i(), b.chain(g).filter(function (a) {
return !!a.length()
}).uniq(!1, function (a) {
return a.toString()
}).value()
}

function h(a) {
for (var b = a.tokens, c = a._i + 1, d = b.length; d > c; c++) {
if (":" == b[c].type) return !0;
if ("identifier" == b[c].type || "line" == b[c].type) return !1
}
return !1
}
var i = {
styleBefore: "\n	",
styleSeparator: ": ",
offset: 0
}, j = 1,
k = 2,
l = a("editTree").EditContainer.extend({
initialize: function (d) {
b.defaults(this.options, i);
var g = a("editTree"),
j = a("tokenIterator").create(a("cssParser").parse(d)),
k = e(j);
if (this._positions.name = k.start, this._name = k.substring(d), !j.current() || "{" != j.current().type) throw "Invalid CSS rule";
this._positions.contentStart = j.position() + 1;
for (var l, n, o; o = j.next();)
if ("identifier" == o.type && h(j)) {
l = c(o), n = f(j);
var p = j.current() && ";" == j.current().type ? c(j.current()) : c(n.end, 0);
this._children.push(new m(this, g.createToken(l.start, l.substring(d)), g.createToken(n.start, n.substring(d)), g.createToken(p.start, p.substring(d))))
}
this._saveStyle()
},
_saveStyle: function () {
var c = this._positions.contentStart,
d = this.source,
e = a("utils");
b.each(this.list(), function (a) {
a.styleBefore = d.substring(c, a.namePosition());
var f = e.splitByLines(a.styleBefore);
f.length > 1 && (a.styleBefore = "\n" + b.last(f)), a.styleSeparator = d.substring(a.nameRange().end, a.valuePosition()), a.styleBefore = b.last(a.styleBefore.split("*/")), a.styleSeparator = a.styleSeparator.replace(/\/\*.*?\*\//g, ""), c = a.range().end
})
},
add: function (c, d, e) {
var f = this.list(),
g = this._positions.contentStart,
h = b.pick(this.options, "styleBefore", "styleSeparator"),
i = a("editTree");
b.isUndefined(e) && (e = f.length);
var j = f[e];
j ? g = j.fullRange().start : (j = f[e - 1]) && (j.end(";"), g = j.range().end), j && (h = b.pick(j, "styleBefore", "styleSeparator"));
var k = i.createToken(g + h.styleBefore.length, c),
l = i.createToken(k.end + h.styleSeparator.length, d),
n = new m(this, k, l, i.createToken(l.end, ";"));
return b.extend(n, h), this._updateSource(n.styleBefore + n.toString(), g), this._children.splice(e, 0, n), n
}
}),
m = a("editTree").EditElement.extend({
initialize: function (a, b, c, d) {
this.styleBefore = a.options.styleBefore, this.styleSeparator = a.options.styleSeparator, this._end = d.value, this._positions.end = d.start
},
valueParts: function (a) {
var c = g(this.value());
if (a) {
var d = this.valuePosition(!0);
b.each(c, function (a) {
a.shift(d)
})
}
return c
},
end: function (a) {
return b.isUndefined(a) || this._end === a || (this.parent._updateSource(a, this._positions.end, this._positions.end + this._end.length), this._end = a), this._end
},
fullRange: function (a) {
var b = this.range(a);
return b.start -= this.styleBefore.length, b
},
toString: function () {
return this.name() + this.styleSeparator + this.value() + this.end()
}
});
return {
parse: function (a, b) {
return new l(a, b)
},
parseFromPosition: function (a, b, c) {
var d = this.extractRule(a, b, c);
return d && d.inside(b) ? this.parse(d.substring(a), {
offset: d.start
}) : null
},
extractRule: function (b, c, d) {
for (var e, f = "", g = b.length, h = c, i = "{}/\\<>\n\r", j = -1; h >= 0;) {
if (e = b.charAt(h), "{" == e) {
j = h;
break
}
if ("}" == e && !d) {
h++;
break
}
h--
}
for (; g > h;) {
if (e = b.charAt(h), "{" == e) j = h;
else if ("}" == e) {
-1 != j && (f = b.substring(j, h + 1));
break
}
h++
}
if (f) {
h = j - 1;
for (var k = ""; h >= 0 && (e = b.charAt(h), -1 == i.indexOf(e));) h--;
return k = b.substring(h + 1, j).replace(/^[\s\n\r]+/m, ""), a("range").create(j - k.length, f.length + k.length)
}
return null
},
baseName: function (a) {
return a.replace(/^\s*\-\w+\-/, "")
},
findParts: g
}
}), emmet.define("xmlEditTree", function (a, b) {
var c = {
styleBefore: " ",
styleSeparator: "=",
styleQuote: '"',
offset: 0
}, d = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m,
e = a("editTree").EditContainer.extend({
initialize: function (d) {
b.defaults(this.options, c), this._positions.name = 1;
var e = null,
g = a("xmlParser").parse(d),
h = a("range");
b.each(g, function (a) {
switch (a.value = h.create(a).substring(d), a.type) {
case "tag":
/^<[^\/]+/.test(a.value) && (this._name = a.value.substring(1));
break;
case "attribute":
e && this._children.push(new f(this, e)), e = a;
break;
case "string":
this._children.push(new f(this, e, a)), e = null
}
}, this), e && this._children.push(new f(this, e)), this._saveStyle()
},
_saveStyle: function () {
var a = this.nameRange().end,
c = this.source;
b.each(this.list(), function (b) {
b.styleBefore = c.substring(a, b.namePosition()), -1 !== b.valuePosition() && (b.styleSeparator = c.substring(b.namePosition() + b.name().length, b.valuePosition() - b.styleQuote.length)), a = b.range().end
})
},
add: function (c, d, e) {
var g = this.list(),
h = this.nameRange().end,
i = a("editTree"),
j = b.pick(this.options, "styleBefore", "styleSeparator", "styleQuote");
b.isUndefined(e) && (e = g.length);
var k = g[e];
k ? h = k.fullRange().start : (k = g[e - 1]) && (h = k.range().end), k && (j = b.pick(k, "styleBefore", "styleSeparator", "styleQuote")), d = j.styleQuote + d + j.styleQuote;
var l = new f(this, i.createToken(h + j.styleBefore.length, c), i.createToken(h + j.styleBefore.length + c.length + j.styleSeparator.length, d));
return b.extend(l, j), this._updateSource(l.styleBefore + l.toString(), h), this._children.splice(e, 0, l), l
}
}),
f = a("editTree").EditElement.extend({
initialize: function (a, b, c) {
this.styleBefore = a.options.styleBefore, this.styleSeparator = a.options.styleSeparator;
var d = "",
e = a.options.styleQuote;
c && (d = c.value, e = d.charAt(0), '"' == e || "'" == e ? d = d.substring(1) : e = "", e && d.charAt(d.length - 1) == e && (d = d.substring(0, d.length - 1))), this.styleQuote = e, this._value = d, this._positions.value = c ? c.start + e.length : -1
},
fullRange: function (a) {
var b = this.range(a);
return b.start -= this.styleBefore.length, b
},
toString: function () {
return this.name() + this.styleSeparator + this.styleQuote + this.value() + this.styleQuote
}
});
return {
parse: function (a, b) {
return new e(a, b)
},
parseFromPosition: function (a, b, c) {
var d = this.extractTag(a, b, c);
return d && d.inside(b) ? this.parse(d.substring(a), {
offset: d.start
}) : null
},
extractTag: function (b, c, e) {
var f, g = b.length,
h = a("range"),
i = Math.min(2e3, g),
j = null,
k = function (a) {
var c;
return "<" == b.charAt(a) && (c = b.substr(a, i).match(d)) ? h.create(a, c[0]) : void 0
};
for (f = c; f >= 0 && !(j = k(f)); f--);
if (j && (j.inside(c) || e)) return j;
if (!j && e) return null;
for (f = c; g > f; f++)
if (j = k(f)) return j
}
}
}), emmet.define("expandAbbreviation", function (a, b) {
var c = a("handlerList").create(),
d = null,
e = a("actions");
return e.add("expand_abbreviation", function (d, e, f) {
var g = b.toArray(arguments),
h = a("editorUtils").outputInfo(d, e, f);
return g[1] = h.syntax, g[2] = h.profile, c.exec(!1, g)
}), e.add("expand_abbreviation_with_tab", function (b, c, d) {
var f = b.getSelection(),
g = a("resources").getVariable("indentation");
if (f) {
var h = a("utils"),
i = a("range").create(b.getSelectionRange()),
j = h.padString(f, g);
b.replaceContent(g + "${0}", b.getCaretPos());
var k = a("range").create(b.getCaretPos(), i.length());
return b.replaceContent(j, k.start, k.end, !0), b.createSelection(k.start, k.start + j.length), !0
}
return e.run("expand_abbreviation", b, c, d) || b.replaceContent(g, b.getCaretPos()), !0
}, {
hidden: !0
}), c.add(function (b, c, e) {
var f = b.getSelectionRange().end,
g = d.findAbbreviation(b);
if (g) {
var h = emmet.expandAbbreviation(g, c, e, a("actionUtils").captureContext(b));
if (h) return b.replaceContent(h, f - g.length, f), !0
}
return !1
}, {
order: -1
}), d = {
addHandler: function (a, b) {
c.add(a, b)
},
removeHandler: function (a) {
c.remove(a, options)
},
findAbbreviation: function (b) {
var c = a("range").create(b.getSelectionRange()),
d = String(b.getContent());
if (c.length()) return c.substring(d);
var e = b.getCurrentLineRange();
return a("actionUtils").extractAbbreviation(d.substring(e.start, c.start))
}
}
}), emmet.define("wrapWithAbbreviation", function (a) {
var b = null;
return a("actions").add("wrap_with_abbreviation", function (c, d, e, f) {
var g = a("editorUtils").outputInfo(c, e, f),
h = a("utils"),
i = a("editorUtils");
if (d = d || c.prompt("Enter abbreviation"), !d) return null;
d = String(d);
var j = a("range").create(c.getSelectionRange());
if (!j.length()) {
var k = a("htmlMatcher").tag(g.content, j.start);
if (!k) return !1;
j = h.narrowToNonSpace(g.content, k.range)
}
var l = h.escapeText(j.substring(g.content)),
m = b.wrap(d, i.unindent(c, l), g.syntax, g.profile, a("actionUtils").captureContext(c));
return m ? (c.replaceContent(m, j.start, j.end), !0) : !1
}), b = {
wrap: function (b, c, d, e, f) {
var g = a("filters"),
h = a("utils");
d = d || emmet.defaultSyntax(), e = a("profile").get(e, d), a("tabStops").resetTabstopIndex();
var i = g.extractFromAbbreviation(b),
j = a("abbreviationParser").parse(i[0], {
syntax: d,
pastedContent: c,
contextNode: f
});
if (j) {
var k = g.composeList(d, e, i[1]);
return g.apply(j, k, e), h.replaceVariables(j.toString())
}
return null
}
}
}), emmet.exec(function (a, b) {
function c(b) {
var c = a("range").create(b.getSelectionRange()),
d = a("editorUtils").outputInfo(b);
if (!c.length()) {
var e = a("htmlMatcher").tag(d.content, b.getCaretPos());
e && (c = e.outerRange)
}
return g(b, "<!--", "-->", c)
}

function d(b) {
var c = a("range").create(b.getSelectionRange()),
d = a("editorUtils").outputInfo(b);
if (!c.length()) {
var f = a("cssEditTree").parseFromPosition(d.content, b.getCaretPos());
if (f) {
var h = e(f, b.getCaretPos());
c = h ? h.range(!0) : a("range").create(f.nameRange(!0).start, f.source)
}
}
return c.length() || (c = a("range").create(b.getCurrentLineRange()), a("utils").narrowToNonSpace(d.content, c)), g(b, "/*", "*/", c)
}

function e(a, c) {
var d = c - (a.options.offset || 0),
e = /^[\s\n\r]/;
return b.find(a.list(), function (b) {
return b.range().end === d ? e.test(a.source.charAt(d)) : b.range().inside(d)
})
}

function f(b, c, d, e) {
for (var f = -1, g = -1, h = function (a, c) {
return b.substr(c, a.length) == a
}; c--;)
if (h(d, c)) {
f = c;
break
}
if (-1 != f) {
c = f;
for (var i = b.length; i >= c++;)
if (h(e, c)) {
g = c + e.length;
break
}
}
return -1 != f && -1 != g ? a("range").create(f, g - f) : null
}

function g(b, c, d, e) {
function g(a) {
return a.replace(new RegExp("^" + l.escapeForRegexp(c) + "\\s*"), function (a) {
return j -= a.length, ""
}).replace(new RegExp("\\s*" + l.escapeForRegexp(d) + "$"), "")
}
var h = a("editorUtils"),
i = h.outputInfo(b).content,
j = b.getCaretPos(),
k = null,
l = a("utils"),
m = f(i, j, c, d);
return m && m.overlap(e) ? (e = m, k = g(e.substring(i))) : (k = c + " " + e.substring(i).replace(new RegExp(l.escapeForRegexp(c) + "\\s*|\\s*" + l.escapeForRegexp(d), "g"), "") + " " + d, j += c.length + 1), null !== k ? (k = l.escapeText(k), b.setCaretPos(e.start), b.replaceContent(h.unindent(b, k), e.start, e.end), b.setCaretPos(j), !0) : !1
}
a("actions").add("toggle_comment", function (b) {
var e = a("editorUtils").outputInfo(b);
if ("css" == e.syntax) {
var f = b.getCaretPos(),
g = a("htmlMatcher").tag(e.content, f);
g && g.open.range.inside(f) && (e.syntax = "html")
}
return "html" == e.syntax ? c(b) : d(b)
})
}), emmet.exec(function (a) {
function b(a, b, c) {
function d(a) {
for (var b = a; b >= 0;) {
var c = f.charAt(b);
if ("\n" == c || "\r" == c) break;
b--
}
return f.substring(b, a)
}
b = b || 1, c = c || 0;
for (var e = a.getCaretPos() + c, f = String(a.getContent()), g = f.length, h = -1, i = /^\s+$/; g >= e && e >= 0;) {
e += b;
var j = f.charAt(e),
k = f.charAt(e + 1),
l = f.charAt(e - 1);
switch (j) {
case '"':
case "'":
k == j && "=" == l && (h = e + 1);
break;
case ">":
"<" == k && (h = e + 1);
break;
case "\n":
case "\r":
i.test(d(e - 1)) && (h = e)
}
if (-1 != h) break
}
return h
}
var c = a("actions");
c.add("prev_edit_point", function (a) {
var c = a.getCaretPos(),
d = b(a, -1);
return d == c && (d = b(a, -1, -2)), -1 != d ? (a.setCaretPos(d), !0) : !1
}, {
label: "Previous Edit Point"
}), c.add("next_edit_point", function (a) {
var c = b(a, 1);
return -1 != c ? (a.setCaretPos(c), !0) : !1
})
}), emmet.exec(function (a, b) {
function c(b, c, d, e) {
for (var f, g, h = a("range"), i = a("editorUtils").outputInfo(b).content, j = i.length, k = h.create(-1, 0), l = h.create(b.getSelectionRange()), m = l.start, n = 1e5; m >= 0 && j > m && --n > 0;) {
if (f = d(i, m, c)) {
if (k.equal(f)) break;
if (k = f.clone(), g = e(f.substring(i), f.start, l.clone())) return b.createSelection(g.start, g.end), !0;
m = c ? f.start : f.end - 1
}
m += c ? -1 : 1
}
return !1
}

function d(a) {
var b = !0;
return c(a, !1, function (a, c) {
return b ? (b = !1, i(a, c)) : j(a, c)
}, function (a, b, c) {
return h(a, b, c, !1)
})
}

function e(a) {
return c(a, !0, j, function (a, b, c) {
return h(a, b, c, !0)
})
}

function f(c, d, e) {
e = e || 0;
var f, h, i = a("range"),
j = [],
l = -1,
m = "",
n = "";
return b.each(d, function (a) {
switch (a.type) {
case "tag":
h = c.substring(a.start, a.end), /^<[\w\:\-]/.test(h) && j.push(i.create({
start: a.start + 1,
end: a.end
}));
break;
case "attribute":
l = a.start, m = c.substring(a.start, a.end);
break;
case "string":
j.push(i.create(l, a.end - l)), f = i.create(a), n = f.substring(c), k(n.charAt(0)) && f.start++, k(n.charAt(n.length - 1)) && f.end--, j.push(f), "class" == m && (j = j.concat(g(f.substring(c), f.start)))
}
}), b.each(j, function (a) {
a.shift(e)
}), b.chain(j).filter(function (a) {
return !!a.length()
}).uniq(!1, function (a) {
return a.toString()
}).value()
}

function g(b, c) {
c = c || 0;
var d = [],
e = a("stringStream").create(b),
f = a("range");
e.eatSpace(), e.start = e.pos;
for (var g; g = e.next();) /[\s\u00a0]/.test(g) && (d.push(f.create(e.start + c, e.pos - e.start - 1)), e.eatSpace(), e.start = e.pos);
return d.push(f.create(e.start + c, e.pos - e.start)), d
}

function h(c, d, e, g) {
var h = f(c, a("xmlParser").parse(c), d);
g && h.reverse();
var i = b.find(h, function (a) {
return a.equal(e)
});
if (i) {
var j = b.indexOf(h, i);
return j < h.length - 1 ? h[j + 1] : null
}
if (g) return b.find(h, function (a) {
return a.start < e.start
});
if (!i) {
var k = b.filter(h, function (a) {
return a.inside(e.end)
});
if (k.length > 1) return k[1]
}
return b.find(h, function (a) {
return a.end > e.end
})
}

function i(a, b) {
for (var c; b >= 0;) {
if (c = j(a, b)) return c;
b--
}
return null
}

function j(b, c) {
var d;
return "<" == b.charAt(c) && (d = b.substring(c, b.length).match(r)) ? a("range").create(c, d[0]) : void 0
}

function k(a) {
return '"' == a || "'" == a
}

function l(c) {
var d = c.valueRange(!0),
e = [c.range(!0), d],
f = a("stringStream"),
g = a("cssEditTree"),
h = a("range"),
i = c.value();
return b.each(c.valueParts(), function (a) {
var c = a.clone();
e.push(c.shift(d.start));
var j = f.create(a.substring(i));
if (j.match(/^[\w\-]+\(/, !0)) {
j.start = j.pos, j.skipToPair("(", ")");
var k = j.current();
e.push(h.create(c.start + j.start, k)), b.each(g.findParts(k), function (a) {
e.push(h.create(c.start + j.start + a.start, a.substring(k)))
})
}
}), b.chain(e).filter(function (a) {
return !!a.length()
}).uniq(!1, function (a) {
return a.toString()
}).value()
}

function m(a, c, d) {
var e, f, g, h, i = null,
j = null,
k = a.list();
for (d ? (k.reverse(), g = function (a) {
return a.range(!0).start <= c.start
}, h = function (a) {
return a.start < c.start
}) : (g = function (a) {
return a.range(!0).end >= c.end
}, h = function (a) {
return a.end > c.start
}); i = b.find(k, g);) {
if (e = l(i), d && e.reverse(), j = b.find(e, function (a) {
return a.equal(c)
})) {
if (f = b.indexOf(e, j), f != e.length - 1) {
j = e[f + 1];
break
}
} else {
var m = b.filter(e, function (a) {
return a.inside(c.end)
});
if (m.length > 1) {
j = m[1];
break
}
if (j = b.find(e, h)) break
}
j = null, c.start = c.end = d ? i.range(!0).start - 1 : i.range(!0).end + 1
}
return j
}

function n(b) {
return c(b, !1, a("cssEditTree").extractRule, p)
}

function o(b) {
return c(b, !0, a("cssEditTree").extractRule, q)
}

function p(b, c, d) {
var e = a("cssEditTree").parse(b, {
offset: c
}),
f = e.nameRange(!0);
return d.end < f.end ? f : m(e, d, !1)
}

function q(b, c, d) {
var e = a("cssEditTree").parse(b, {
offset: c
}),
f = m(e, d, !0);
if (!f) {
var g = e.nameRange(!0);
if (d.start > g.start) return g
}
return f
}
var r = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
s = a("actions");
s.add("select_next_item", function (a) {
return "css" == a.getSyntax() ? n(a) : d(a)
}), s.add("select_previous_item", function (a) {
return "css" == a.getSyntax() ? o(a) : e(a)
})
}), emmet.exec(function (a) {
function b(b, c) {
c = String((c || "out").toLowerCase());
var f = a("editorUtils").outputInfo(b),
g = a("range"),
h = g.create(b.getSelectionRange()),
i = f.content;
if (e && !e.range.equal(h) && (e = null), e && h.length())
if ("in" == c) {
if ("tag" == e.type && !e.close) return !1;
if (e.range.equal(e.outerRange)) e.range = e.innerRange;
else {
var j = a("utils").narrowToNonSpace(i, e.innerRange);
e = d.find(i, j.start + 1), e && e.range.equal(h) && e.outerRange.equal(h) && (e.range = e.innerRange)
}
} else !e.innerRange.equal(e.outerRange) && e.range.equal(e.innerRange) && h.equal(e.range) ? e.range = e.outerRange : (e = d.find(i, h.start), e && e.range.equal(h) && e.innerRange.equal(h) && (e.range = e.outerRange));
else e = d.find(i, h.start);
return e && !e.range.equal(h) ? (b.createSelection(e.range.start, e.range.end), !0) : (e = null, !1)
}
var c = a("actions"),
d = a("htmlMatcher"),
e = null;
c.add("match_pair", b, {
hidden: !0
}), c.add("match_pair_inward", function (a) {
return b(a, "in")
}, {
label: "HTML/Match Pair Tag (inward)"
}), c.add("match_pair_outward", function (a) {
return b(a, "out")
}, {
label: "HTML/Match Pair Tag (outward)"
}), c.add("matching_pair", function (a) {
var b = String(a.getContent()),
c = a.getCaretPos();
"<" == b.charAt(c) && c++;
var e = d.tag(b, c);
return e && e.close ? (e.open.range.inside(c) ? a.setCaretPos(e.close.range.start) : a.setCaretPos(e.open.range.start), !0) : !1
}, {
label: "HTML/Go To Matching Tag Pair"
})
}), emmet.exec(function (a) {
a("actions").add("remove_tag", function (b) {
var c = a("utils"),
d = a("editorUtils").outputInfo(b),
e = a("htmlMatcher").tag(d.content, b.getCaretPos());
if (e) {
if (e.close) {
var f = c.narrowToNonSpace(d.content, e.innerRange),
g = c.findNewlineBounds(d.content, f.start),
h = c.getLinePadding(g.substring(d.content)),
i = f.substring(d.content);
i = c.unindentString(i, h), b.replaceContent(c.getCaretPlaceholder() + c.escapeText(i), e.outerRange.start, e.outerRange.end)
} else b.replaceContent(c.getCaretPlaceholder(), e.range.start, e.range.end);
return !0
}
return !1
}, {
label: "HTML/Remove Tag"
})
}), emmet.exec(function (a) {
function b(b, c, d) {
var e = a("utils"),
f = c.selfClosing() || " /",
g = d.open.range.substring(d.source).replace(/\s*>$/, f + ">"),
h = b.getCaretPos();
return g.length + d.outerRange.start < h && (h = g.length + d.outerRange.start), g = e.escapeText(g), b.replaceContent(g, d.outerRange.start, d.outerRange.end), b.setCaretPos(h), !0
}

function c(b, c, d) {
var e = a("utils"),
f = e.getNewline(),
g = a("resources").getVariable("indentation"),
h = b.getCaretPos(),
i = c.tag_nl === !0 ? f + g + f : "",
j = d.outerContent().replace(/\s*\/>$/, ">");
return h = d.outerRange.start + j.length, j += i + "</" + d.open.name + ">", j = e.escapeText(j), b.replaceContent(j, d.outerRange.start, d.outerRange.end), b.setCaretPos(h), !0
}
a("actions").add("split_join_tag", function (d, e) {
var f = a("htmlMatcher"),
g = a("editorUtils").outputInfo(d, null, e),
h = a("profile").get(g.profile),
i = f.tag(g.content, d.getCaretPos());
return i ? i.close ? b(d, h, i) : c(d, h, i) : !1
}, {
label: "HTML/Split\\Join Tag Declaration"
})
}), emmet.define("reflectCSSValue", function (a, b) {
function c(b) {
var c = a("cssEditTree"),
d = a("editorUtils").outputInfo(b),
e = b.getCaretPos(),
f = c.parseFromPosition(d.content, e);
if (f) {
var h = f.itemFromPosition(e, !0);
if (h) {
var i = f.source,
j = f.options.offset,
k = e - j - h.range().start;
return g.exec(!1, [h]), i !== f.source ? {
data: f.source,
start: j,
end: j + i.length,
caret: j + h.range().start + k
} : void 0
}
}
}

function d(b) {
b = a("cssEditTree").baseName(b);
var c, d = "^(?:\\-\\w+\\-)?";
return "opacity" == b || "filter" == b ? new RegExp(d + "(?:opacity|filter)$") : (c = b.match(/^border-radius-(top|bottom)(left|right)/)) ? new RegExp(d + "(?:" + b + "|border-" + c[1] + "-" + c[2] + "-radius)$") : (c = b.match(/^border-(top|bottom)-(left|right)-radius/)) ? new RegExp(d + "(?:" + b + "|border-radius-" + c[1] + c[2] + ")$") : new RegExp(d + b + "$")
}

function e(a, b) {
var c = f(a.name(), a.value(), b.name(), b.value());
b.value(c)
}

function f(b, c, d, e) {
var f = a("cssEditTree"),
g = a("utils");
if (b = f.baseName(b), d = f.baseName(d), "opacity" == b && "filter" == d) return e.replace(/opacity=[^)]*/i, "opacity=" + Math.floor(100 * parseFloat(c)));
if ("filter" == b && "opacity" == d) {
var h = c.match(/opacity=([^)]*)/i);
return h ? g.prettifyNumber(parseInt(h[1]) / 100) : e
}
return c
}
var g = a("handlerList").create();
return a("actions").add("reflect_css_value", function (b) {
return "css" != b.getSyntax() ? !1 : a("actionUtils").compoundUpdate(b, c(b))
}, {
label: "CSS/Reflect Value"
}), g.add(function (a) {
var c = d(a.name());
b.each(a.parent.list(), function (b) {
c.test(b.name()) && e(a, b)
})
}, {
order: -1
}), {
addHandler: function (a, b) {
g.add(a, b)
},
removeHandler: function (a) {
g.remove(a, options)
}
}
}), emmet.exec(function (a) {
a("actions").add("evaluate_math_expression", function (b) {
var c = a("actionUtils"),
d = a("utils"),
e = String(b.getContent()),
f = ".+-*/\\",
g = a("range").create(b.getSelectionRange());
if (g.length() || (g = c.findExpressionBounds(b, function (a) {
return d.isNumeric(a) || -1 != f.indexOf(a)
})), g && g.length()) {
var h = g.substring(e);
h = h.replace(/([\d\.\-]+)\\([\d\.\-]+)/g, "Math.round($1/$2)");
try {
var i = d.prettifyNumber(new Function("return " + h)());
return b.replaceContent(i, g.start, g.end), b.setCaretPos(g.start + i.length), !0
} catch (j) {}
}
return !1
}, {
label: "Numbers/Evaluate Math Expression"
})
}), emmet.exec(function (a, b) {
function c(c, e) {
var f = a("utils"),
g = a("actionUtils"),
h = !1,
i = !1,
j = g.findExpressionBounds(c, function (a, b, c) {
return f.isNumeric(a) ? !0 : "." == a ? f.isNumeric(c.charAt(b + 1)) ? i ? !1 : i = !0 : !1 : "-" == a ? h ? !1 : h = !0 : !1
});
if (j && j.length()) {
var k = j.substring(String(c.getContent())),
l = parseFloat(k);
if (!b.isNaN(l)) {
if (l = f.prettifyNumber(l + e), /^(\-?)0+[1-9]/.test(k)) {
var m = "";
RegExp.$1 && (m = "-", l = l.substring(1));
var n = l.split(".");
n[0] = f.zeroPadString(n[0], d(k)), l = m + n.join(".")
}
return c.replaceContent(l, j.start, j.end), c.createSelection(j.start, j.start + l.length), !0
}
}
return !1
}

function d(a) {
return a = a.replace(/^\-/, ""), ~a.indexOf(".") ? a.split(".")[0].length : a.length
}
var e = a("actions");
b.each([1, -1, 10, -10, .1, -.1], function (a) {
var b = a > 0 ? "increment" : "decrement";
e.add(b + "_number_by_" + String(Math.abs(a)).replace(".", "").substring(0, 2), function (b) {
return c(b, a)
}, {
label: "Numbers/" + b.charAt(0).toUpperCase() + b.substring(1) + " number by " + Math.abs(a)
})
})
}), emmet.exec(function (a, b) {
var c = a("actions"),
d = a("preferences");
d.define("css.closeBraceIndentation", "\n", "Indentation before closing brace of CSS rule. Some users prefere indented closing brace of CSS rule for better readability. This preference’s value will be automatically inserted before closing brace when user adds newline in newly created CSS rule (e.g. when “Insert formatted linebreak” action will be performed in CSS file). If you’re such user, you may want to write put a value like <code>\\n\\t</code> in this preference."), c.add("insert_formatted_line_break_only", function (c) {
var e = a("utils"),
f = a("resources"),
g = a("editorUtils").outputInfo(c),
h = c.getCaretPos(),
i = e.getNewline();
if (b.include(["html", "xml", "xsl"], g.syntax)) {
var j = f.getVariable("indentation"),
k = a("htmlMatcher").tag(g.content, h);
if (k && !k.innerRange.length()) return c.replaceContent(i + j + e.getCaretPlaceholder() + i, h), !0
} else if ("css" == g.syntax) {
var l = g.content;
if (h && "{" == l.charAt(h - 1)) {
var m = d.get("css.closeBraceIndentation"),
j = f.getVariable("indentation"),
n = "}" == l.charAt(h);
if (!n)
for (var o, p = h, q = l.length; q > p && (o = l.charAt(p), "{" != o); p++)
if ("}" == o) {
m = "", n = !0;
break
}
n || (m += "}");
var r = i + j + e.getCaretPlaceholder() + m;
return c.replaceContent(r, h), !0
}
}
return !1
}, {
hidden: !0
}), c.add("insert_formatted_line_break", function (b) {
if (!c.run("insert_formatted_line_break_only", b)) {
for (var d, e = a("utils"), f = a("editorUtils").getCurrentLinePadding(b), g = String(b.getContent()), h = b.getCaretPos(), i = g.length, j = e.getNewline(), k = b.getCurrentLineRange(), l = "", m = k.end + 1; i > m && (d = g.charAt(m), " " == d || "	" == d); m++) l += d;
l.length > f.length ? b.replaceContent(j + l, h, h, !0) : b.replaceContent(j, h)
}
return !0
}, {
hidden: !0
})
}), emmet.exec(function (a) {
a("actions").add("merge_lines", function (b) {
var c = a("htmlMatcher"),
d = a("utils"),
e = a("editorUtils"),
f = e.outputInfo(b),
g = a("range").create(b.getSelectionRange());
if (!g.length()) {
var h = c.find(f.content, b.getCaretPos());
h && (g = h.outerRange)
}
if (g.length()) {
for (var i = g.substring(f.content), j = d.splitByLines(i), k = 1; k < j.length; k++) j[k] = j[k].replace(/^\s+/, "");
i = j.join("").replace(/\s{2,}/, " ");
var l = i.length;
return i = d.escapeText(i), b.replaceContent(i, g.start, g.end), b.createSelection(g.start, g.start + l), !0
}
return !1
})
}), emmet.exec(function (a) {
function b(a, b, c) {
return c = c || 0, b.charAt(c) == a.charAt(0) && b.substr(c, a.length) == a
}

function c(b, c, d) {
var e = a("file"),
f = a("actionUtils"),
g = b.getFilePath(),
h = "application/octet-stream";
if (null === g) throw "You should save your file before using this action";
var i = e.locateFile(g, c);
if (null === i) throw "Can't find " + c + " file";
return e.read(i, function (g, j) {
if (g) throw "Unable to read " + i + ": " + g;
var k = a("base64").encode(String(j));
if (!k) throw "Can't encode file content to base64";
k = "data:" + (f.mimeTypes[String(e.getExt(i))] || h) + ";base64," + k, b.replaceContent("$0" + k, d, d + c.length)
}), !0
}

function d(b, c, d) {
var e = String(b.prompt("Enter path to file (absolute or relative)"));
if (!e) return !1;
var f = a("file"),
g = f.createPath(b.getFilePath(), e);
if (!g) throw "Can't save file";
return f.save(g, a("base64").decode(c.replace(/^data\:.+?;.+?,/, ""))), b.replaceContent("$0" + e, d, d + c.length), !0
}
a("actions").add("encode_decode_data_url", function (a) {
var e = String(a.getSelection()),
f = a.getCaretPos();
if (!e)
for (var g, h = String(a.getContent()); f-- >= 0;) {
if (b("src=", h, f)) {
(g = h.substr(f).match(/^(src=(["'])?)([^'"<>\s]+)\1?/)) && (e = g[3], f += g[1].length);
break
}
if (b("url(", h, f)) {
(g = h.substr(f).match(/^(url\((['"])?)([^'"\)\s]+)\1?/)) && (e = g[3], f += g[1].length);
break
}
}
return e ? b("data:", e) ? d(a, e, f) : c(a, e, f) : !1
}, {
label: "Encode\\Decode data:URL image"
})
}), emmet.exec(function (a, b) {
function c(c) {
var d = c.getCaretPos(),
f = a("editorUtils").outputInfo(c),
g = a("xmlEditTree").parseFromPosition(f.content, d, !0);
g && "img" == (g.name() || "").toLowerCase() && e(c, g.value("src"), function (e) {
if (e) {
var f = g.range(!0);
g.value("width", e.width), g.value("height", e.height, g.indexOf("width") + 1), a("actionUtils").compoundUpdate(c, b.extend(f, {
data: g.toString(),
caret: d
}))
}
})
}

function d(c) {
var d = c.getCaretPos(),
f = a("editorUtils").outputInfo(c),
g = a("cssEditTree").parseFromPosition(f.content, d, !0);
if (g) {
var h, i = g.itemFromPosition(d, !0);
i && (h = /url\((["']?)(.+?)\1\)/i.exec(i.value() || "")) && e(c, h[2], function (e) {
if (e) {
var f = g.range(!0);
g.value("width", e.width + "px"), g.value("height", e.height + "px", g.indexOf("width") + 1), a("actionUtils").compoundUpdate(c, b.extend(f, {
data: g.toString(),
caret: d
}))
}
})
}
}

function e(b, c, d) {
var e, f = a("actionUtils");
if (c) {
if (/^data:/.test(c)) return e = a("base64").decode(c.replace(/^data\:.+?;.+?,/, "")), d(f.getImageSize(e));
var g = a("file"),
h = g.locateFile(b.getFilePath(), c);
if (null === h) throw "Can't find " + c + " file";
g.read(h, function (a, b) {
if (a) throw "Unable to read " + h + ": " + a;
b = String(b), d(f.getImageSize(b))
})
}
}
a("actions").add("update_image_size", function (a) {
return b.include(["css", "less", "scss"], String(a.getSyntax())) ? d(a) : c(a), !0
})
}), emmet.define("cssResolver", function (a, b) {
function c(a) {
var b = a && a.charCodeAt(0);
return a && "." == a || b > 47 && 58 > b
}

function d(b) {
var c = a("utils");
return b = c.trim(b), ~b.indexOf("/*") || /[\n\r]/.test(b) ? !1 : /^[a-z0-9\-]+\s*\:/i.test(b) ? (b = a("tabStops").processText(b, {
replaceCarets: !0,
tabstop: function () {
return "value"
}
}), 2 == b.split(":").length) : !1
}

function e(a) {
return "-" != a.charAt(0) || /^\-[\.\d]/.test(a) || (a = a.replace(/^\-+/, "")), "#" == a.charAt(0) ? f(a) : g(a)
}

function f(b) {
var c = b.replace(/^#+/, "") || "0";
if ("t" == c.toLowerCase()) return "transparent";
var d = a("utils").repeatString,
e = null;
switch (c.length) {
case 1:
e = d(c, 6);
break;
case 2:
e = d(c, 3);
break;
case 3:
e = c.charAt(0) + c.charAt(0) + c.charAt(1) + c.charAt(1) + c.charAt(2) + c.charAt(2);
break;
case 4:
e = c + c.substr(0, 2);
break;
case 5:
e = c + c.charAt(0);
break;
default:
e = c.substr(0, 6)
}
if (u.get("css.color.short")) {
var f = e.split("");
f[0] == f[1] && f[2] == f[3] && f[4] == f[5] && (e = f[0] + f[2] + f[4])
}
switch (u.get("css.color.case")) {
case "upper":
e = e.toUpperCase();
break;
case "lower":
e = e.toLowerCase()
}
return "#" + e
}

function g(a) {
var b = u.getDict("css.keywordAliases");
return a in b ? b[a] : a
}

function h(a) {
var b = u.getDict("css.unitAliases");
return a in b ? b[a] : a
}

function i(a) {
return b.include(u.getArray("css.keywords"), g(a))
}

function j(a, c) {
var d = s[c];
return d || (d = b.find(s, function (a) {
return a.prefix == c
})), d && d.supports(a)
}

function k(a, c) {
var d = [];
return b.each(s, function (b, c) {
j(a, c) && d.push(c)
}), d.length || c || b.each(s, function (a, b) {
a.obsolete || d.push(b)
}), d
}

function l(a, c) {
b.isString(c) && (c = {
prefix: c
}), s[a] = b.extend({}, r, c)
}

function m(a, c) {
if (c) {
var d = u.get(c + "." + a);
if (!b.isUndefined(d)) return d
}
return u.get("css." + a)
}

function n(b, c) {
var d = b.indexOf(":");
return b = b.substring(0, d).replace(/\s+$/, "") + m("valueSeparator", c) + a("utils").trim(b.substring(d + 1)), b.replace(/\s*;\s*$/, m("propertyEnd", c))
}

function o(a, c, e) {
return b.isString(a) || (a = a.data), d(a) ? (c && (~a.indexOf(";") ? a = a.split(";").join(" !important;") : a += " !important"), n(a, e)) : a
}

function p(a) {
var c = u.getArray(a);
return b.each(u.getArray(a + "Addon"), function (a) {
"-" == a.charAt(0) ? c = b.without(c, a.substr(1)) : ("+" == a.charAt(0) && (a = a.substr(1)), c.push(a))
}), c
}
var q = null,
r = {
prefix: "emmet",
obsolete: !1,
transformName: function (a) {
return "-" + this.prefix + "-" + a
},
properties: function () {
return p("css." + this.prefix + "Properties") || []
},
supports: function (a) {
return b.include(this.properties(), a)
}
}, s = {}, t = "${1};",
u = a("preferences");
u.define("css.valueSeparator", ": ", "Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations."), u.define("css.propertyEnd", ";", "Defines a symbol that should be placed at the end of CSS property  when expanding CSS abbreviations."), u.define("stylus.valueSeparator", " ", "Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations in Stylus dialect."), u.define("stylus.propertyEnd", "", "Defines a symbol that should be placed at the end of CSS property  when expanding CSS abbreviations in Stylus dialect."), u.define("sass.propertyEnd", "", "Defines a symbol that should be placed at the end of CSS property  when expanding CSS abbreviations in SASS dialect."), u.define("css.autoInsertVendorPrefixes", !0, "Automatically generate vendor-prefixed copies of expanded CSS property. By default, Emmet will generate vendor-prefixed properties only when you put dash before abbreviation (e.g. <code>-bxsh</code>). With this option enabled, you don’t need dashes before abbreviations: Emmet will produce vendor-prefixed properties for you.");
var v = b.template("A comma-separated list of CSS properties that may have <code><%= vendor %></code> vendor prefix. This list is used to generate a list of prefixed properties when expanding <code>-property</code> abbreviations. Empty list means that all possible CSS values may have <code><%= vendor %></code> prefix."),
w = b.template("A comma-separated list of <em>additional</em> CSS properties for <code>css.<%= vendor %>Preperties</code> preference. You should use this list if you want to add or remove a few CSS properties to original set. To add a new property, simply write its name, to remove it, precede property with hyphen.<br>For example, to add <em>foo</em> property and remove <em>border-radius</em> one, the preference value will look like this: <code>foo, -border-radius</code>."),
x = {
webkit: "animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius",
moz: "animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius",
ms: "accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, word-wrap, wrap-flow, wrap-margin, wrap-through, writing-mode",
o: "dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style"
};
b.each(x, function (a, b) {
u.define("css." + b + "Properties", a, v({
vendor: b
})), u.define("css." + b + "PropertiesAddon", "", w({
vendor: b
}))
}), u.define("css.unitlessProperties", "z-index, line-height, opacity, font-weight, zoom", "The list of properties whose values ​​must not contain units."), u.define("css.intUnit", "px", "Default unit for integer values"), u.define("css.floatUnit", "em", "Default unit for float values"), u.define("css.keywords", "auto, inherit", "A comma-separated list of valid keywords that can be used in CSS abbreviations."), u.define("css.keywordAliases", "a:auto, i:inherit, s:solid, da:dashed, do:dotted, t:transparent", "A comma-separated list of keyword aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:keyword_name</code>."), u.define("css.unitAliases", "e:em, p:%, x:ex, r:rem", "A comma-separated list of unit aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:unit_value</code>."), u.define("css.color.short", !0, "Should color values like <code>#ffffff</code> be shortened to <code>#fff</code> after abbreviation with color was expanded."), u.define("css.color.case", "keep", "Letter case of color values generated by abbreviations with color (like <code>c#0</code>). Possible values are <code>upper</code>, <code>lower</code> and <code>keep</code>."), u.define("css.fuzzySearch", !0, "Enable fuzzy search among CSS snippet names. When enabled, every <em>unknown</em> snippet will be scored against available snippet names (not values or CSS properties!). The match with best score will be used to resolve snippet value. For example, with this preference enabled, the following abbreviations are equal: <code>ov:h</code> == <code>ov-h</code> == <code>o-h</code> == <code>oh</code>"), u.define("css.fuzzySearchMinScore", .3, "The minium score (from 0 to 1) that fuzzy-matched abbreviation should achive. Lower values may produce many false-positive matches, higher values may reduce possible matches."), u.define("css.alignVendor", !1, "If set to <code>true</code>, all generated vendor-prefixed properties will be aligned by real property name."), l("w", {
prefix: "webkit"
}), l("m", {
prefix: "moz"
}), l("s", {
prefix: "ms"
}), l("o", {
prefix: "o"
});
var y = ["css", "less", "sass", "scss", "stylus"];
a("resources").addResolver(function (a, c) {
return b.include(y, c) && a.isElement() ? q.expandToSnippet(a.abbreviation, c) : null
});
var z = a("expandAbbreviation");
return z.addHandler(function (a, c, d) {
if (!b.include(y, c)) return !1;
var e = a.getSelectionRange().end,
f = z.findAbbreviation(a);
if (f) {
var g = emmet.expandAbbreviation(f, c, d);
if (g) {
var h = e - f.length,
i = e;
return ";" == a.getContent().charAt(e) && ";" == g.charAt(g.length - 1) && i++, a.replaceContent(g, h, i), !0
}
}
return !1
}), q = {
addPrefix: l,
supportsPrefix: j,
prefixed: function (a, b) {
return j(a, b) ? "-" + b + "-" + a : a
},
listPrefixes: function () {
return b.map(s, function (a) {
return a.prefix
})
},
getPrefix: function (a) {
return s[a]
},
removePrefix: function (a) {
a in s && delete s[a]
},
extractPrefixes: function (a) {
if ("-" != a.charAt(0)) return {
property: a,
prefixes: null
};
for (var b, c = 1, d = a.length, e = []; d > c;) {
if (b = a.charAt(c), "-" == b) {
c++;
break
}
if (!(b in s)) {
e.length = 0, c = 1;
break
}
e.push(b), c++
}
return c == d - 1 && (c = 1, e.length = 1), {
property: a.substring(c),
prefixes: e.length ? e : "all"
}
},
findValuesInAbbreviation: function (b, d) {
d = d || "css";
for (var e, f = 0, g = b.length, h = ""; g > f;) {
if (e = b.charAt(f), c(e) || "#" == e || "-" == e && c(b.charAt(f + 1))) {
h = b.substring(f);
break
}
f++
}
for (var j = b.substring(0, b.length - h.length), k = a("resources"), l = [];~ j.indexOf("-") && !k.findSnippet(d, j);) {
var m = j.split("-"),
n = m.pop();
if (!i(n)) break;
l.unshift(n), j = m.join("-")
}
return l.join("-") + h
},
parseValues: function (d) {
for (var f = a("stringStream").create(d), g = [], h = null; h = f.next();) "#" == h ? (f.match(/^t|[0-9a-f]+/i, !0), g.push(f.current())) : "-" == h ? ((i(b.last(g)) || f.start && c(d.charAt(f.start - 1))) && (f.start = f.pos), f.match(/^\-?[0-9]*(\.[0-9]+)?[a-z%\.]*/, !0), g.push(f.current())) : (f.match(/^[0-9]*(\.[0-9]*)?[a-z%]*/, !0), g.push(f.current())), f.start = f.pos;
return b.map(b.compact(g), e)
},
extractValues: function (a) {
var b = this.findValuesInAbbreviation(a);
return b ? {
property: a.substring(0, a.length - b.length).replace(/-$/, ""),
values: this.parseValues(b)
} : {
property: a,
values: null
}
},
normalizeValue: function (a, c) {
c = (c || "").toLowerCase();
var d = u.getArray("css.unitlessProperties");
return a.replace(/^(\-?[0-9\.]+)([a-z]*)$/, function (a, e, f) {
return f || "0" != e && !b.include(d, c) ? f ? e + h(f) : e.replace(/\.$/, "") + u.get(~e.indexOf(".") ? "css.floatUnit" : "css.intUnit") : e
})
},
expand: function (c, e, f) {
f = f || "css";
var g, h = a("resources"),
i = u.get("css.autoInsertVendorPrefixes");
(g = /^(.+)\!$/.test(c)) && (c = RegExp.$1);
var j = h.findSnippet(f, c);
if (j && !i) return o(j, g, f);
var l = this.extractPrefixes(c),
m = this.extractValues(l.property),
n = b.extend(l, m);
if (j ? n.values = null : j = h.findSnippet(f, n.property), !j && u.get("css.fuzzySearch") && (j = h.fuzzyFindSnippet(f, n.property, parseFloat(u.get("css.fuzzySearchMinScore")))), j ? b.isString(j) || (j = j.data) : j = n.property + ":" + t, !d(j)) return j;
var p = this.splitSnippet(j),
q = [];
!e && n.values && (e = b.map(n.values, function (a) {
return this.normalizeValue(a, p.name)
}, this).join(" ") + ";"), p.value = e || p.value;
var r, v = "all" == n.prefixes || !n.prefixes && i ? k(p.name, i && "all" != n.prefixes) : n.prefixes,
w = [];
if (b.each(v, function (a) {
a in s && (r = s[a].transformName(p.name), w.push(r), q.push(o(r + ":" + p.value, g, f)))
}), q.push(o(p.name + ":" + p.value, g, f)), w.push(p.name), u.get("css.alignVendor")) {
var x = a("utils").getStringsPads(w);
q = b.map(q, function (a, b) {
return x[b] + a
})
}
return q
},
expandToSnippet: function (a, c) {
var d = this.expand(a, null, c);
return b.isArray(d) ? d.join("\n") : b.isString(d) ? String(d) : d.data
},
splitSnippet: function (b) {
var c = a("utils");
if (b = c.trim(b), -1 == b.indexOf(":")) return {
name: b,
value: t
};
var d = b.split(":");
return {
name: c.trim(d.shift()),
value: c.trim(d.join(":")).replace(/^(\$\{0\}|\$0)(\s*;?)$/, "${1}$2")
}
},
getSyntaxPreference: m,
transformSnippet: o
}
}), emmet.define("cssGradient", function (a, b) {
function c(b) {
return a("utils").trim(b).replace(/\s+/g, " ")
}

function d(d) {
for (var f, g = p[0], h = a("stringStream").create(a("utils").trim(d)), i = []; f = h.next();) "," == h.peek() ? (i.push(h.current()), h.next(), h.eatSpace(), h.start = h.pos) : "(" == f && h.skipTo(")");
return i.push(h.current()), i = b.compact(b.map(i, c)), i.length ? ((s.test(i[0]) || t.test(i[0])) && (g = i.shift()), {
type: "linear",
direction: g,
colorStops: b.map(i, e)
}) : null
}

function e(a) {
a = c(a);
var b = null;
if (a = a.replace(/^(\w+\(.+?\))\s*/, function (a, c) {
return b = c, ""
}), !b) {
var d = a.split(" ");
b = d[0], a = d[1] || ""
}
var e = {
color: b
};
return a && a.replace(/^(\-?[\d\.]+)([a-z%]+)?$/, function (a, b, c) {
e.position = b, ~b.indexOf(".") ? c = "" : c || (c = "%"), c && (e.unit = c)
}), e
}

function f(c, d) {
var e = a("resources"),
f = a("preferences"),
g = e.findSnippet(d, c);
return !g && f.get("css.fuzzySearch") && (g = e.fuzzyFindSnippet(d, c, parseFloat(f.get("css.fuzzySearchMinScore")))), g ? (b.isString(g) || (g = g.data), a("cssResolver").splitSnippet(g).name) : void 0
}

function g(a) {
var c = 0;
b.each(a, function (d, e) {
if (!e) return d.position = d.position || 0;
if (e != a.length - 1 || "position" in d || (d.position = 1), "position" in d) {
var f = a[c].position || 0,
g = (d.position - f) / (e - c);
b.each(a.slice(c, e), function (a, b) {
a.position = f + g * b
}), c = e
}
})
}

function h(a) {
var c = parseFloat(a);
if (!b.isNaN(c)) switch (c % 360) {
case 0:
return "left";
case 90:
return "bottom";
case 180:
return "right";
case 240:
return "top"
}
return a
}

function i(a) {
if (a = h(a), s.test(a)) throw "The direction is an angle that can’t be converted.";
var b = function (b) {
return~ a.indexOf(b) ? "100%" : "0"
};
return b("right") + " " + b("bottom") + ", " + b("left") + " " + b("top")
}

function j(a) {
var c = u.getArray("css.gradient.prefixes"),
d = b.map(c, function (b) {
return "-" + b + "-" + a
});
return d.push(a), d
}

function k(c, d) {
var e = [],
f = a("cssResolver");
return u.get("css.gradient.fallback") && ~d.toLowerCase().indexOf("background") && e.push({
name: "background-color",
value: "${1:" + c.colorStops[0].color + "}"
}), b.each(u.getArray("css.gradient.prefixes"), function (a) {
var b = f.prefixed(d, a);
if ("webkit" == a && u.get("css.gradient.oldWebkit")) try {
e.push({
name: b,
value: q.oldWebkitLinearGradient(c)
})
} catch (g) {}
e.push({
name: b,
value: q.toString(c, a)
})
}), e.sort(function (a, b) {
return b.name.length - a.name.length
})
}

function l(c, d, e) {
var f = c.parent,
g = a("utils"),
h = a("preferences").get("css.alignVendor"),
i = c.styleSeparator,
l = c.styleBefore;
if (b.each(f.getAll(j(c.name())), function (a) {
a != c && /gradient/i.test(a.value()) && (a.styleSeparator.length < i.length && (i = a.styleSeparator), a.styleBefore.length < l.length && (l = a.styleBefore), f.remove(a))
}), h) {
if (l != c.styleBefore) {
var m = c.fullRange();
f._updateSource(l, m.start, m.start + c.styleBefore.length), c.styleBefore = l
}
i != c.styleSeparator && (f._updateSource(i, c.nameRange().end, c.valueRange().start), c.styleSeparator = i)
}
var n = c.value();
e || (e = a("range").create(0, c.value()));
var o = function (a) {
return g.replaceSubstring(n, a, e)
};
c.value(o(q.toString(d)) + "${2}");
var p = k(d, c.name());
if (h) {
var r = b.pluck(p, "value"),
s = b.pluck(p, "name");
r.push(c.value()), s.push(c.name());
var t = g.getStringsPads(b.map(r, function (a) {
return a.substring(0, a.indexOf("("))
})),
u = g.getStringsPads(s);
c.name(b.last(u) + c.name()), b.each(p, function (a, b) {
a.name = u[b] + a.name, a.value = t[b] + a.value
}), c.value(b.last(t) + c.value())
}
b.each(p, function (a) {
f.add(a.name, a.value, f.indexOf(c))
})
}

function m(a) {
var c = a.value(),
d = null,
e = b.find(a.valueParts(), function (a) {
return d = q.parse(a.substring(c))
});
return e && d ? {
gradient: d,
valueRange: e
} : null
}

function n(c, d) {
var e = u.get("css.gradient.defaultProperty");
if (!e) return !1;
var f = String(c.getContent()),
g = a("range").create(c.getCurrentLineRange()),
h = g.substring(f).replace(/^\s+/, function (a) {
return g.start += a.length, ""
}).replace(/\s+$/, function (a) {
return g.end -= a.length, ""
}),
i = a("cssResolver"),
j = q.parse(h);
if (j) {
var l = k(j, e);
l.push({
name: e,
value: q.toString(j) + "${2}"
});
var m = i.getSyntaxPreference("valueSeparator", d),
n = i.getSyntaxPreference("propertyEnd", d);
if (a("preferences").get("css.alignVendor")) {
var o = a("utils").getStringsPads(b.map(l, function (a) {
return a.value.substring(0, a.value.indexOf("("))
}));
b.each(l, function (a, b) {
a.value = o[b] + a.value
})
}
return l = b.map(l, function (a) {
return a.name + m + a.value + n
}), c.replaceContent(l.join("\n"), g.start, g.end), !0
}
return !1
}

function o(c, d) {
var e = null,
f = a("cssEditTree").parseFromPosition(c, d, !0);
return f && (e = f.itemFromPosition(d, !0), e || (e = b.find(f.list(), function (a) {
return a.range(!0).end == d
}))), {
rule: f,
property: e
}
}
var p = ["top", "to bottom", "0deg"],
q = null,
r = ["css", "less", "sass", "scss", "stylus", "styl"],
s = /\d+deg/i,
t = /top|bottom|left|right/i,
u = a("preferences");
return u.define("css.gradient.prefixes", "webkit, moz, o", "A comma-separated list of vendor-prefixes for which values should be generated."), u.define("css.gradient.oldWebkit", !0, "Generate gradient definition for old Webkit implementations"), u.define("css.gradient.omitDefaultDirection", !0, "Do not output default direction definition in generated gradients."), u.define("css.gradient.defaultProperty", "background-image", "When gradient expanded outside CSS value context, it will produce properties with this name."), u.define("css.gradient.fallback", !1, "With this option enabled, CSS gradient generator will produce <code>background-color</code> property with gradient first color as fallback for old browsers."), a("expandAbbreviation").addHandler(function (c, d, e) {
var g = a("editorUtils").outputInfo(c, d, e);
if (!b.include(r, g.syntax)) return !1;
var h = c.getCaretPos(),
i = g.content,
j = o(i, h);
if (j.property) {
var k = m(j.property);
if (k) {
var p = j.rule.options.offset || 0,
q = p + j.rule.toString().length;
if (/[\n\r]/.test(j.property.value())) {
var s = j.property.valueRange(!0).start + k.valueRange.end;
i = a("utils").replaceSubstring(i, ";", s);
var t = o(i, h);
t.property && (k = m(t.property), j = t)
}
j.property.end(";");
var u = f(j.property.name(), d);
return u && j.property.name(u), l(j.property, k.gradient, k.valueRange), c.replaceContent(j.rule.toString(), p, q, !0), !0
}
}
return n(c, d)
}), a("reflectCSSValue").addHandler(function (c) {
var d = a("utils"),
e = m(c);
if (!e) return !1;
var f = c.value(),
g = function (a) {
return d.replaceSubstring(f, a, e.valueRange)
};
return b.each(c.parent.getAll(j(c.name())), function (a) {
if (a !== c) {
var b = a.value().match(/^\s*(\-([a-z]+)\-)?linear\-gradient/);
b ? a.value(g(q.toString(e.gradient, b[2] || ""))) : (b = a.value().match(/\s*\-webkit\-gradient/)) && a.value(g(q.oldWebkitLinearGradient(e.gradient)))
}
}), !0
}), q = {
parse: function (b) {
var c = null;
return a("utils").trim(b).replace(/^([\w\-]+)\((.+?)\)$/, function (a, b, e) {
return b = b.toLowerCase().replace(/^\-[a-z]+\-/, ""), "linear-gradient" == b || "lg" == b ? (c = d(e), "") : a
}), c
},
oldWebkitLinearGradient: function (a) {
if (b.isString(a) && (a = this.parse(a)), !a) return null;
var c = b.map(a.colorStops, b.clone);
return b.each(c, function (a) {
if ("position" in a) {
if (!~a.position.indexOf(".") && "%" != a.unit) throw "Can't convert color stop '" + (a.position + (a.unit || "")) + "'";
a.position = parseFloat(a.position) / ("%" == a.unit ? 100 : 1)
}
}), g(c), c = b.map(c, function (a, b) {
return a.position || b ? 1 == a.position && b == c.length - 1 ? "to(" + a.color + ")" : "color-stop(" + a.position.toFixed(2).replace(/\.?0+$/, "") + ", " + a.color + ")" : "from(" + a.color + ")"
}), "-webkit-gradient(linear, " + i(a.direction) + ", " + c.join(", ") + ")"
},
toString: function (a, c) {
if ("linear" == a.type) {
var d = (c ? "-" + c + "-" : "") + "linear-gradient",
e = b.map(a.colorStops, function (a) {
return a.color + ("position" in a ? " " + a.position + (a.unit || "") : "")
});
return !a.direction || u.get("css.gradient.omitDefaultDirection") && b.include(p, a.direction) || e.unshift(a.direction), d + "(" + e.join(", ") + ")"
}
}
}
}), emmet.exec(function (a, b) {
var c = a("handlerList").create(),
d = a("resources");
b.extend(d, {
addGenerator: function (a, d, e) {
b.isString(a) && (a = new RegExp(a)), c.add(function (b, c) {
var e;
return (e = a.exec(b.name())) ? d(e, b, c) : null
}, e)
}
}), d.addResolver(function () {
return c.exec(null, b.toArray(arguments))
})
}), emmet.define("tagName", function (a, b) {
var c = {
empty: "area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command".split(","),
blockLevel: "address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6".split(","),
inlineLevel: "a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var".split(",")
}, d = {
p: "span",
ul: "li",
ol: "li",
table: "tr",
tr: "td",
tbody: "tr",
thead: "tr",
tfoot: "tr",
colgroup: "col",
select: "option",
optgroup: "option",
audio: "source",
video: "source",
object: "param",
map: "area"
};
return {
resolve: function (a) {
return a = (a || "").toLowerCase(), a in d ? this.getMapping(a) : this.isInlineLevel(a) ? "span" : "div"
},
getMapping: function (a) {
return d[a.toLowerCase()]
},
isInlineLevel: function (a) {
return this.isTypeOf(a, "inlineLevel")
},
isBlockLevel: function (a) {
return this.isTypeOf(a, "blockLevel")
},
isEmptyElement: function (a) {
return this.isTypeOf(a, "empty")
},
isTypeOf: function (a, d) {
return b.include(c[d], a)
},
addMapping: function (a, b) {
d[a] = b
},
removeMapping: function (a) {
a in d && delete d[a]
},
addElementToCollection: function (a, d) {
c[d] || (c[d] = []);
var e = this.getCollection(d);
b.include(e, a) || e.push(a)
},
removeElementFromCollection: function (a, d) {
d in c && (c[d] = b.without(this.getCollection(d), a))
},
getCollection: function (a) {
return c[a]
}
}
}), emmet.exec(function (a, b) {
function c() {
return {
element: i.get("bem.elementSeparator"),
modifier: i.get("bem.modifierSeparator")
}
}

function d(c) {
if (a("abbreviationUtils").isSnippet(c)) return c;
c.__bem = {
block: "",
element: "",
modifier: ""
};
var d = e(c.attribute("class")).split(" "),
g = /^[a-z]\-/i;
return c.__bem.block = b.find(d, function (a) {
return g.test(a)
}), c.__bem.block || (g = /^[a-z]/i, c.__bem.block = b.find(d, function (a) {
return g.test(a)
}) || ""), d = b.chain(d).map(function (a) {
return f(a, c)
}).flatten().uniq().value().join(" "), d && c.attribute("class", d), c
}

function e(b) {
var d = a("utils");
b = (" " + (b || "") + " ").replace(/\s+/g, " ");
var e = i.get("bem.shortElementPrefix");
if (e) {
var f = new RegExp("\\s(" + d.escapeForRegexp(e) + "+)", "g");
b = b.replace(f, function (a, b) {
return " " + d.repeatString(c().element, b.length)
})
}
return d.trim(b)
}

function f(a, b) {
a = g(a, b, "element"), a = g(a, b, "modifier");
var d = "",
e = "",
f = "",
h = c();
if (~a.indexOf(h.element)) {
var i = a.split(h.element),
j = i[1].split(h.modifier);
d = i[0], e = j.shift(), f = j.join(h.modifier)
} else if (~a.indexOf(h.modifier)) {
var k = a.split(h.modifier);
d = k.shift(), f = k.join(h.modifier)
}
if (d || e || f) {
d || (d = b.__bem.block);
var l = d,
m = [];
return e ? (l += h.element + e, m.push(l)) : m.push(l), f && m.push(l + h.modifier + f), b.__bem.block = d, b.__bem.element = e, b.__bem.modifier = f, m
}
return a
}

function g(a, b, d) {
var e = c(),
f = new RegExp("^(" + e[d] + ")+", "g");
if (f.test(a)) {
for (var g = 0, h = a.replace(f, function (a) {
return g = a.length / e[d].length, ""
}), i = b; i.parent && g--;) i = i.parent;
if (i && i.__bem || (i = b), i && i.__bem) {
var j = i.__bem.block;
return "modifier" == d && i.__bem.element && (j += e.element + i.__bem.element), j + e[d] + h
}
}
return a
}

function h(c, e) {
c.name && d(c, e);
var f = a("abbreviationUtils");
return b.each(c.children, function (a) {
h(a, e), !f.isSnippet(a) && a.start && (j = !0)
}), c
}
var i = a("preferences");
i.define("bem.elementSeparator", "__", "Class name’s element separator."), i.define("bem.modifierSeparator", "_", "Class name’s modifier separator."), i.define("bem.shortElementPrefix", "-", "Symbol for describing short “block-element” notation. Class names prefixed with this symbol will be treated as element name for parent‘s block name. Each symbol instance traverses one level up in parsed tree for block name lookup. Empty value will disable short notation.");
var j = !1;
a("filters").add("bem", function (b, c) {
return j = !1, b = h(b, c), j && (b = a("filters").apply(b, "html", c)), b
})
}), emmet.exec(function (a, b) {
function c(c, d, f) {
var g = a("utils"),
h = e.get("filter.commentTrigger");
if ("*" != h) {
var i = b.find(h.split(","), function (a) {
return !!c.attribute(g.trim(a))
});
if (!i) return
}
var j = {
node: c,
name: c.name(),
padding: c.parent ? c.parent.padding : "",
attr: function (a, b, d) {
var e = c.attribute(a);
return e ? (b || "") + e + (d || "") : ""
}
}, k = g.normalizeNewline(d ? d(j) : ""),
l = g.normalizeNewline(f ? f(j) : "");
c.start = c.start.replace(/</, k + "<"), c.end = c.end.replace(/>/, ">" + l)
}

function d(e, f, g) {
var h = a("abbreviationUtils");
return b.each(e.children, function (a) {
h.isBlock(a) && c(a, f, g), d(a, f, g)
}), e
}
var e = a("preferences");
e.define("filter.commentAfter", '\n<!-- /<%= attr("id", "#") %><%= attr("class", ".") %> -->', "A definition of comment that should be placed <i>after</i> matched element when <code>comment</code> filter is applied. This definition is an ERB-style template passed to <code>_.template()</code> function (see Underscore.js docs for details). In template context, the following properties and functions are availabe:\n<ul><li><code>attr(name, before, after)</code> – a function that outputsspecified attribute value concatenated with <code>before</code> and <code>after</code> strings. If attribute doesn't exists, the empty string will be returned.</li><li><code>node</code> – current node (instance of <code>AbbreviationNode</code>)</li><li><code>name</code> – name of current tag</li><li><code>padding</code> – current string padding, can be used for formatting</li></ul>"), e.define("filter.commentBefore", "", "A definition of comment that should be placed <i>before</i> matched element when <code>comment</code> filter is applied. For more info, read description of <code>filter.commentAfter</code> property"), e.define("filter.commentTrigger", "id, class", "A comma-separated list of attribute names that should exist in abbreviatoin where comment should be added. If you wish to add comment for every element, set this option to <code>*</code>"), a("filters").add("c", function (a) {
var c = b.template(e.get("filter.commentBefore")),
f = b.template(e.get("filter.commentAfter"));
return d(a, c, f)
})
}), emmet.exec(function (a, b) {
function c(a) {
return a.replace(/([<>&])/g, function (a, b) {
return d[b]
})
}
var d = {
"<": "&lt;",
">": "&gt;",
"&": "&amp;"
};
a("filters").add("e", function e(a) {
return b.each(a.children, function (a) {
a.start = c(a.start), a.end = c(a.end), a.content = c(a.content), e(a)
}), a
})
}), emmet.exec(function (a, b) {
function c(c) {
return b.include(n.getArray("format.noIndentTags") || [], c.name()) ? "" : a("resources").getVariable("indentation")
}

function d(b) {
return b.parent && a("abbreviationUtils").hasBlockChildren(b.parent)
}

function e(a) {
return a.parent && !a.parent.parent && !a.index()
}

function f(b, c) {
var d = a("abbreviationUtils");
return c.tag_nl === !0 || d.isBlock(b) ? !0 : b.parent && c.inline_break ? h(b.parent, c) : !1
}

function g(a, b) {
return a.children.length && f(a.children[0], b)
}

function h(c, d) {
var e = 0,
f = a("abbreviationUtils");
return !!b.find(c.children, function (a) {
return a.isTextNode() || !f.isInline(a) ? e = 0 : f.isInline(a) && e++, e >= d.inline_break ? !0 : void 0
})
}

function i(a) {
return !a.parent
}

function j(b, c) {
return b.start = b.end = "", !e(b) && c.tag_nl !== !1 && f(b, c) && (i(b.parent) || !a("abbreviationUtils").isInline(b.parent)) && (b.start = a("utils").getNewline() + b.start), b
}

function k(c, d) {
var e = a("abbreviationUtils"),
f = b.any(c.children, function (a) {
return e.isSnippet(a) ? !1 : !e.isInline(a)
});
return f ? !0 : h(c, d)
}

function l(h, i) {
h.start = h.end = m;
var j = a("utils"),
l = a("abbreviationUtils"),
o = l.isUnary(h),
p = j.getNewline(),
q = c(h);
if (i.tag_nl !== !1) {
var r = i.tag_nl === !0 && (i.tag_nl_leaf || h.children.length);
r || (r = b.include(n.getArray("format.forceIndentationForTags") || [], h.name())), h.isTextNode() || (f(h, i) ? (e(h) || l.isSnippet(h.parent) && !h.index() || (h.start = p + h.start), (l.hasBlockChildren(h) || g(h, i) || r && !o) && (h.end = p + h.end), (l.hasTagsInContent(h) || r && !h.children.length && !o) && (h.start += p + q)) : l.isInline(h) && d(h) && !e(h) ? h.start = p + h.start : l.isInline(h) && k(h, i) && (h.end = p + h.end), h.padding = q)
}
return h
}
var m = "%s",
n = a("preferences");
n.define("format.noIndentTags", "html", "A comma-separated list of tag names that should not get inner indentation."), n.define("format.forceIndentationForTags", "body", "A comma-separated list of tag names that should <em>always</em> get inner indentation."), a("filters").add("_format", function o(c, d, e) {
e = e || 0;
var f = a("abbreviationUtils");
return b.each(c.children, function (a) {
f.isSnippet(a) ? j(a, d, e) : l(a, d, e), o(a, d, e + 1)
}), c
})
}), emmet.exec(function (a, b) {
function c(b) {
return a("utils").trim(b).replace(/\s+/g, ".")
}

function d(a, d) {
var e = "",
f = [],
g = d.attributeQuote(),
h = d.cursor();
return b.each(a.attributeList(), function (a) {
var b = d.attributeName(a.name);
switch (b.toLowerCase()) {
case "id":
e += "#" + (a.value || h);
break;
case "class":
e += "." + c(a.value || h);
break;
default:
f.push(":" + b + " => " + g + (a.value || h) + g)
}
}), f.length && (e += "{" + f.join(", ") + "}"), e
}

function e(b, c) {
if (!b.parent) return b;
var e = a("abbreviationUtils"),
f = a("utils"),
g = d(b, c),
h = c.cursor(),
i = e.isUnary(b),
j = c.self_closing_tag && i ? "/" : "",
k = "",
l = "%" + c.tagName(b.name());
"%div" == l.toLowerCase() && g && -1 == g.indexOf("{") && (l = ""), b.end = "", k = l + g + j + " ";
var m = "%s";
return b.start = f.replaceSubstring(b.start, k, b.start.indexOf(m), m), b.children.length || i || (b.start += h), b
}
a("filters").add("haml", function f(c, d, g) {
g = g || 0;
var h = a("abbreviationUtils");
return g || (c = a("filters").apply(c, "_format", d)), b.each(c.children, function (a) {
h.isSnippet(a) || e(a, d, g), f(a, d, g + 1)
}), c
})
}), emmet.exec(function (a, b) {
function c(a, c) {
var d = c.attributeQuote(),
e = c.cursor();
return b.map(a.attributeList(), function (a) {
var b = c.attributeName(a.name);
return " " + b + "=" + d + (a.value || e) + d
}).join("")
}

function d(b, d) {
if (!b.parent) return b;
var e = a("abbreviationUtils"),
f = a("utils"),
g = c(b, d),
h = d.cursor(),
i = e.isUnary(b),
j = "",
k = "";
if (!b.isTextNode()) {
var l = d.tagName(b.name());
i ? (j = "<" + l + g + d.selfClosing() + ">", b.end = "") : (j = "<" + l + g + ">", k = "</" + l + ">")
}
var m = "%s";
return b.start = f.replaceSubstring(b.start, j, b.start.indexOf(m), m), b.end = f.replaceSubstring(b.end, k, b.end.indexOf(m), m), b.children.length || i || ~b.content.indexOf(h) || a("tabStops").extract(b.content).tabstops.length || (b.start += h), b
}
a("filters").add("html", function e(c, f, g) {
g = g || 0;
var h = a("abbreviationUtils");
return g || (c = a("filters").apply(c, "_format", f)), b.each(c.children, function (a) {
h.isSnippet(a) || d(a, f, g), e(a, f, g + 1)
}), c
})
}), emmet.exec(function (a, b) {
var c = /^\s+/,
d = /[\n\r]/g;
a("filters").add("s", function e(f) {
var g = a("abbreviationUtils");
return b.each(f.children, function (a) {
g.isSnippet(a) || (a.start = a.start.replace(c, ""), a.end = a.end.replace(c, "")), a.start = a.start.replace(d, ""), a.end = a.end.replace(d, ""), a.content = a.content.replace(d, ""), e(a)
}), f
})
}), emmet.exec(function (a, b) {
function c(a, d) {
return b.each(a.children, function (a) {
a.content && (a.content = a.content.replace(d, "")), c(a, d)
}), a
}
a("preferences").define("filter.trimRegexp", "[\\s|\\u00a0]*[\\d|#|\\-|*|\\u2022]+\\.?\\s*", "Regular expression used to remove list markers (numbers, dashes, bullets, etc.) in <code>t</code> (trim) filter. The trim filter is useful for wrapping with abbreviation lists, pased from other documents (for example, Word documents)."), a("filters").add("t", function (b) {
var d = new RegExp(a("preferences").get("filter.trimRegexp"));
return c(b, d)
})
}), emmet.exec(function (a, b) {
function c(a) {
a.start = a.start.replace(/\s+select\s*=\s*(['"]).*?\1/, "")
}
var d = {
"xsl:variable": 1,
"xsl:with-param": 1
};
a("filters").add("xsl", function e(f) {
var g = a("abbreviationUtils");
return b.each(f.children, function (a) {
!g.isSnippet(a) && (a.name() || "").toLowerCase() in d && a.children.length && c(a), e(a)
}), f
})
}), emmet.exec(function (a, b) {
function c(a, b) {
return Math.round(Math.random() * (b - a) + a)
}

function d(a, d) {
for (var e = a.length, f = Math.min(e, d), g = []; g.length < f;) {
var h = c(0, e - 1);
b.include(g, h) || g.push(h)
}
return b.map(g, function (b) {
return a[b]
})
}

function e(a) {
return b.isString(a) ? a.charAt(c(0, a.length - 1)) : a[c(0, a.length - 1)]
}

function f(a, b) {
return a.length && (a[0] = a[0].charAt(0).toUpperCase() + a[0].substring(1)), a.join(" ") + (b || e("?!..."))
}

function g(a) {
var e = a.length,
f = 0;
f = e > 3 && 6 >= e ? c(0, 1) : e > 6 && 12 >= e ? c(0, 2) : c(1, 4), b.each(d(b.range(f)), function (b) {
a[b] += ","
})
}

function h(a, b) {
var e, h = [],
k = 0;
for (a = parseInt(a, 10), b && (e = i.slice(0, a), e.length > 5 && (e[4] += ","), k += e.length, h.push(f(e, "."))); a > k;) e = d(j, Math.min(c(3, 12) * c(1, 5), a - k)), k += e.length, g(e), h.push(f(e));
return h.join(" ")
}
a("abbreviationParser").addPreprocessor(function (a) {
var b, c = /^(?:lorem|lipsum)(\d*)$/i;
a.findAll(function (a) {
if (a._name && (b = a._name.match(c))) {
var d = b[1] || 30;
a._name = "", a.data("forceNameResolving", a.isRepeating() || a.attributeList().length), a.data("pasteOverwrites", !0), a.data("paste", function (a) {
return h(d, !a)
})
}
})
});
var i = "lorem ipsum dolor sit amet consectetur adipisicing elit".split(" "),
j = ["exercitationem", "perferendis", "perspiciatis", "laborum", "eveniet", "sunt", "iure", "nam", "nobis", "eum", "cum", "officiis", "excepturi", "odio", "consectetur", "quasi", "aut", "quisquam", "vel", "eligendi", "itaque", "non", "odit", "tempore", "quaerat", "dignissimos", "facilis", "neque", "nihil", "expedita", "vitae", "vero", "ipsum", "nisi", "animi", "cumque", "pariatur", "velit", "modi", "natus", "iusto", "eaque", "sequi", "illo", "sed", "ex", "et", "voluptatibus", "tempora", "veritatis", "ratione", "assumenda", "incidunt", "nostrum", "placeat", "aliquid", "fuga", "provident", "praesentium", "rem", "necessitatibus", "suscipit", "adipisci", "quidem", "possimus", "voluptas", "debitis", "sint", "accusantium", "unde", "sapiente", "voluptate", "qui", "aspernatur", "laudantium", "soluta", "amet", "quo", "aliquam", "saepe", "culpa", "libero", "ipsa", "dicta", "reiciendis", "nesciunt", "doloribus", "autem", "impedit", "minima", "maiores", "repudiandae", "ipsam", "obcaecati", "ullam", "enim", "totam", "delectus", "ducimus", "quis", "voluptates", "dolores", "molestiae", "harum", "dolorem", "quia", "voluptatem", "molestias", "magni", "distinctio", "omnis", "illum", "dolorum", "voluptatum", "ea", "quas", "quam", "corporis", "quae", "blanditiis", "atque", "deserunt", "laboriosam", "earum", "consequuntur", "hic", "cupiditate", "quibusdam", "accusamus", "ut", "rerum", "error", "minus", "eius", "ab", "ad", "nemo", "fugit", "officia", "at", "in", "id", "quos", "reprehenderit", "numquam", "iste", "fugiat", "sit", "inventore", "beatae", "repellendus", "magnam", "recusandae", "quod", "explicabo", "doloremque", "aperiam", "consequatur", "asperiores", "commodi", "optio", "dolor", "labore", "temporibus", "repellat", "veniam", "architecto", "est", "esse", "mollitia", "nulla", "a", "similique", "eos", "alias", "dolore", "tenetur", "deleniti", "porro", "facere", "maxime", "corrupti"]
}), emmet.exec(function (a) {
a("actions").add("select_line", function (a) {
var b = a.getCurrentLineRange();
return a.createSelection(b.start, b.end), !0
})
}), emmet.exec(function (a) {
a("resources").setVocabulary({
variables: {
lang: "en",
locale: "en-US",
charset: "UTF-8",
indentation: "	",
newline: "\n"
},
css: {
filters: "html",
snippets: {
"@i": "@import url(|);",
"@import": "@import url(|);",
"@m": "@media ${1:screen} {\n	|\n}",
"@media": "@media ${1:screen} {\n	|\n}",
"@f": "@font-face {\n	font-family:|;\n	src:url(|);\n}",
"@f+": "@font-face {\n	font-family: '${1:FontName}';\n	src: url('${2:FileName}.eot');\n	src: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n		 url('${2:FileName}.woff') format('woff'),\n		 url('${2:FileName}.ttf') format('truetype'),\n		 url('${2:FileName}.svg#${1:FontName}') format('svg');\n	font-style: ${3:normal};\n	font-weight: ${4:normal};\n}",
"@kf": "@-webkit-keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}\n@-o-keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}\n@-moz-keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}\n@keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}",
anim: "animation:|;",
"anim-": "animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode};",
animdel: "animation-delay:${1:time};",
animdir: "animation-direction:${1:normal};",
"animdir:n": "animation-direction:normal;",
"animdir:r": "animation-direction:reverse;",
"animdir:a": "animation-direction:alternate;",
"animdir:ar": "animation-direction:alternate-reverse;",
animdur: "animation-duration:${1:0}s;",
animfm: "animation-fill-mode:${1:both};",
"animfm:f": "animation-fill-mode:forwards;",
"animfm:b": "animation-fill-mode:backwards;",
"animfm:bt": "animation-fill-mode:both;",
"animfm:bh": "animation-fill-mode:both;",
animic: "animation-iteration-count:${1:1};",
"animic:i": "animation-iteration-count:infinite;",
animn: "animation-name:${1:none};",
animps: "animation-play-state:${1:running};",
"animps:p": "animation-play-state:paused;",
"animps:r": "animation-play-state:running;",
animtf: "animation-timing-function:${1:linear};",
"animtf:e": "animation-timing-function:ease;",
"animtf:ei": "animation-timing-function:ease-in;",
"animtf:eo": "animation-timing-function:ease-out;",
"animtf:eio": "animation-timing-function:ease-in-out;",
"animtf:l": "animation-timing-function:linear;",
"animtf:cb": "animation-timing-function:cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1});",
ap: "appearance:${none}",
"!": "!important",
pos: "position:${1:relative};",
"pos:s": "position:static;",
"pos:a": "position:absolute;",
"pos:r": "position:relative;",
"pos:f": "position:fixed;",
t: "top:|;",
"t:a": "top:auto;",
r: "right:|;",
"r:a": "right:auto;",
b: "bottom:|;",
"b:a": "bottom:auto;",
l: "left:|;",
"l:a": "left:auto;",
z: "z-index:|;",
"z:a": "z-index:auto;",
fl: "float:${1:left};",
"fl:n": "float:none;",
"fl:l": "float:left;",
"fl:r": "float:right;",
cl: "clear:${1:both};",
"cl:n": "clear:none;",
"cl:l": "clear:left;",
"cl:r": "clear:right;",
"cl:b": "clear:both;",
colm: "columns:|;",
colmc: "column-count:|;",
colmf: "column-fill:|;",
colmg: "column-gap:|;",
colmr: "column-rule:|;",
colmrc: "column-rule-color:|;",
colmrs: "column-rule-style:|;",
colmrw: "column-rule-width:|;",
colms: "column-span:|;",
colmw: "column-width:|;",
d: "display:${1:block};",
"d:n": "display:none;",
"d:b": "display:block;",
"d:i": "display:inline;",
"d:ib": "display:inline-block;",
"d:li": "display:list-item;",
"d:ri": "display:run-in;",
"d:cp": "display:compact;",
"d:tb": "display:table;",
"d:itb": "display:inline-table;",
"d:tbcp": "display:table-caption;",
"d:tbcl": "display:table-column;",
"d:tbclg": "display:table-column-group;",
"d:tbhg": "display:table-header-group;",
"d:tbfg": "display:table-footer-group;",
"d:tbr": "display:table-row;",
"d:tbrg": "display:table-row-group;",
"d:tbc": "display:table-cell;",
"d:rb": "display:ruby;",
"d:rbb": "display:ruby-base;",
"d:rbbg": "display:ruby-base-group;",
"d:rbt": "display:ruby-text;",
"d:rbtg": "display:ruby-text-group;",
v: "visibility:${1:hidden};",
"v:v": "visibility:visible;",
"v:h": "visibility:hidden;",
"v:c": "visibility:collapse;",
ov: "overflow:${1:hidden};",
"ov:v": "overflow:visible;",
"ov:h": "overflow:hidden;",
"ov:s": "overflow:scroll;",
"ov:a": "overflow:auto;",
ovx: "overflow-x:${1:hidden};",
"ovx:v": "overflow-x:visible;",
"ovx:h": "overflow-x:hidden;",
"ovx:s": "overflow-x:scroll;",
"ovx:a": "overflow-x:auto;",
ovy: "overflow-y:${1:hidden};",
"ovy:v": "overflow-y:visible;",
"ovy:h": "overflow-y:hidden;",
"ovy:s": "overflow-y:scroll;",
"ovy:a": "overflow-y:auto;",
ovs: "overflow-style:${1:scrollbar};",
"ovs:a": "overflow-style:auto;",
"ovs:s": "overflow-style:scrollbar;",
"ovs:p": "overflow-style:panner;",
"ovs:m": "overflow-style:move;",
"ovs:mq": "overflow-style:marquee;",
zoo: "zoom:1;",
zm: "zoom:1;",
cp: "clip:|;",
"cp:a": "clip:auto;",
"cp:r": "clip:rect(${1:top} ${2:right} ${3:bottom} ${4:left});",
bxz: "box-sizing:${1:border-box};",
"bxz:cb": "box-sizing:content-box;",
"bxz:bb": "box-sizing:border-box;",
bxsh: "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:color};",
"bxsh:r": "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:spread }rgb(${6:0}, ${7:0}, ${8:0});",
"bxsh:ra": "box-shadow:${1:inset }${2:h} ${3:v} ${4:blur} ${5:spread }rgba(${6:0}, ${7:0}, ${8:0}, .${9:5});",
"bxsh:n": "box-shadow:none;",
m: "margin:|;",
"m:a": "margin:auto;",
mt: "margin-top:|;",
"mt:a": "margin-top:auto;",
mr: "margin-right:|;",
"mr:a": "margin-right:auto;",
mb: "margin-bottom:|;",
"mb:a": "margin-bottom:auto;",
ml: "margin-left:|;",
"ml:a": "margin-left:auto;",
p: "padding:|;",
pt: "padding-top:|;",
pr: "padding-right:|;",
pb: "padding-bottom:|;",
pl: "padding-left:|;",
w: "width:|;",
"w:a": "width:auto;",
h: "height:|;",
"h:a": "height:auto;",
maw: "max-width:|;",
"maw:n": "max-width:none;",
mah: "max-height:|;",
"mah:n": "max-height:none;",
miw: "min-width:|;",
mih: "min-height:|;",
mar: "max-resolution:${1:res};",
mir: "min-resolution:${1:res};",
ori: "orientation:|;",
"ori:l": "orientation:landscape;",
"ori:p": "orientation:portrait;",
ol: "outline:|;",
"ol:n": "outline:none;",
olo: "outline-offset:|;",
olw: "outline-width:|;",
ols: "outline-style:|;",
olc: "outline-color:#${1:000};",
"olc:i": "outline-color:invert;",
bd: "border:|;",
"bd+": "border:${1:1px} ${2:solid} ${3:#000};",
"bd:n": "border:none;",
bdbk: "border-break:${1:close};",
"bdbk:c": "border-break:close;",
bdcl: "border-collapse:|;",
"bdcl:c": "border-collapse:collapse;",
"bdcl:s": "border-collapse:separate;",
bdc: "border-color:#${1:000};",
"bdc:t": "border-color:transparent;",
bdi: "border-image:url(|);",
"bdi:n": "border-image:none;",
bdti: "border-top-image:url(|);",
"bdti:n": "border-top-image:none;",
bdri: "border-right-image:url(|);",
"bdri:n": "border-right-image:none;",
bdbi: "border-bottom-image:url(|);",
"bdbi:n": "border-bottom-image:none;",
bdli: "border-left-image:url(|);",
"bdli:n": "border-left-image:none;",
bdci: "border-corner-image:url(|);",
"bdci:n": "border-corner-image:none;",
"bdci:c": "border-corner-image:continue;",
bdtli: "border-top-left-image:url(|);",
"bdtli:n": "border-top-left-image:none;",
"bdtli:c": "border-top-left-image:continue;",
bdtri: "border-top-right-image:url(|);",
"bdtri:n": "border-top-right-image:none;",
"bdtri:c": "border-top-right-image:continue;",
bdbri: "border-bottom-right-image:url(|);",
"bdbri:n": "border-bottom-right-image:none;",
"bdbri:c": "border-bottom-right-image:continue;",
bdbli: "border-bottom-left-image:url(|);",
"bdbli:n": "border-bottom-left-image:none;",
"bdbli:c": "border-bottom-left-image:continue;",
bdf: "border-fit:${1:repeat};",
"bdf:c": "border-fit:clip;",
"bdf:r": "border-fit:repeat;",
"bdf:sc": "border-fit:scale;",
"bdf:st": "border-fit:stretch;",
"bdf:ow": "border-fit:overwrite;",
"bdf:of": "border-fit:overflow;",
"bdf:sp": "border-fit:space;",
bdlen: "border-length:|;",
"bdlen:a": "border-length:auto;",
bdsp: "border-spacing:|;",
bds: "border-style:|;",
"bds:n": "border-style:none;",
"bds:h": "border-style:hidden;",
"bds:dt": "border-style:dotted;",
"bds:ds": "border-style:dashed;",
"bds:s": "border-style:solid;",
"bds:db": "border-style:double;",
"bds:dtds": "border-style:dot-dash;",
"bds:dtdtds": "border-style:dot-dot-dash;",
"bds:w": "border-style:wave;",
"bds:g": "border-style:groove;",
"bds:r": "border-style:ridge;",
"bds:i": "border-style:inset;",
"bds:o": "border-style:outset;",
bdw: "border-width:|;",
bdtw: "border-top-width:|;",
bdrw: "border-right-width:|;",
bdbw: "border-bottom-width:|;",
bdlw: "border-left-width:|;",
bdt: "border-top:|;",
bt: "border-top:|;",
"bdt+": "border-top:${1:1px} ${2:solid} ${3:#000};",
"bdt:n": "border-top:none;",
bdts: "border-top-style:|;",
"bdts:n": "border-top-style:none;",
bdtc: "border-top-color:#${1:000};",
"bdtc:t": "border-top-color:transparent;",
bdr: "border-right:|;",
br: "border-right:|;",
"bdr+": "border-right:${1:1px} ${2:solid} ${3:#000};",
"bdr:n": "border-right:none;",
bdrst: "border-right-style:|;",
"bdrst:n": "border-right-style:none;",
bdrc: "border-right-color:#${1:000};",
"bdrc:t": "border-right-color:transparent;",
bdb: "border-bottom:|;",
bb: "border-bottom:|;",
"bdb+": "border-bottom:${1:1px} ${2:solid} ${3:#000};",
"bdb:n": "border-bottom:none;",
bdbs: "border-bottom-style:|;",
"bdbs:n": "border-bottom-style:none;",
bdbc: "border-bottom-color:#${1:000};",
"bdbc:t": "border-bottom-color:transparent;",
bdl: "border-left:|;",
bl: "border-left:|;",
"bdl+": "border-left:${1:1px} ${2:solid} ${3:#000};",
"bdl:n": "border-left:none;",
bdls: "border-left-style:|;",
"bdls:n": "border-left-style:none;",
bdlc: "border-left-color:#${1:000};",
"bdlc:t": "border-left-color:transparent;",
bdrs: "border-radius:|;",
bdtrrs: "border-top-right-radius:|;",
bdtlrs: "border-top-left-radius:|;",
bdbrrs: "border-bottom-right-radius:|;",
bdblrs: "border-bottom-left-radius:|;",
bg: "background:|;",
"bg+": "background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};",
"bg:n": "background:none;",
"bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');",
bgc: "background-color:#${1:fff};",
"bgc:t": "background-color:transparent;",
bgi: "background-image:url(|);",
"bgi:n": "background-image:none;",
bgr: "background-repeat:|;",
"bgr:n": "background-repeat:no-repeat;",
"bgr:x": "background-repeat:repeat-x;",
"bgr:y": "background-repeat:repeat-y;",
"bgr:sp": "background-repeat:space;",
"bgr:rd": "background-repeat:round;",
bga: "background-attachment:|;",
"bga:f": "background-attachment:fixed;",
"bga:s": "background-attachment:scroll;",
bgp: "background-position:${1:0} ${2:0};",
bgpx: "background-position-x:|;",
bgpy: "background-position-y:|;",
bgbk: "background-break:|;",
"bgbk:bb": "background-break:bounding-box;",
"bgbk:eb": "background-break:each-box;",
"bgbk:c": "background-break:continuous;",
bgcp: "background-clip:${1:padding-box};",
"bgcp:bb": "background-clip:border-box;",
"bgcp:pb": "background-clip:padding-box;",
"bgcp:cb": "background-clip:content-box;",
"bgcp:nc": "background-clip:no-clip;",
bgo: "background-origin:|;",
"bgo:pb": "background-origin:padding-box;",
"bgo:bb": "background-origin:border-box;",
"bgo:cb": "background-origin:content-box;",
bgsz: "background-size:|;",
"bgsz:a": "background-size:auto;",
"bgsz:ct": "background-size:contain;",
"bgsz:cv": "background-size:cover;",
c: "color:#${1:000};",
"c:r": "color:rgb(${1:0}, ${2:0}, ${3:0});",
"c:ra": "color:rgba(${1:0}, ${2:0}, ${3:0}, .${4:5});",
cm: "/* |${child} */",
cnt: "content:'|';",
"cnt:n": "content:normal;",
"cnt:oq": "content:open-quote;",
"cnt:noq": "content:no-open-quote;",
"cnt:cq": "content:close-quote;",
"cnt:ncq": "content:no-close-quote;",
"cnt:a": "content:attr(|);",
"cnt:c": "content:counter(|);",
"cnt:cs": "content:counters(|);",
tbl: "table-layout:|;",
"tbl:a": "table-layout:auto;",
"tbl:f": "table-layout:fixed;",
cps: "caption-side:|;",
"cps:t": "caption-side:top;",
"cps:b": "caption-side:bottom;",
ec: "empty-cells:|;",
"ec:s": "empty-cells:show;",
"ec:h": "empty-cells:hide;",
lis: "list-style:|;",
"lis:n": "list-style:none;",
lisp: "list-style-position:|;",
"lisp:i": "list-style-position:inside;",
"lisp:o": "list-style-position:outside;",
list: "list-style-type:|;",
"list:n": "list-style-type:none;",
"list:d": "list-style-type:disc;",
"list:c": "list-style-type:circle;",
"list:s": "list-style-type:square;",
"list:dc": "list-style-type:decimal;",
"list:dclz": "list-style-type:decimal-leading-zero;",
"list:lr": "list-style-type:lower-roman;",
"list:ur": "list-style-type:upper-roman;",
lisi: "list-style-image:|;",
"lisi:n": "list-style-image:none;",
q: "quotes:|;",
"q:n": "quotes:none;",
"q:ru": "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';",
"q:en": "quotes:'\\201C' '\\201D' '\\2018' '\\2019';",
ct: "content:|;",
"ct:n": "content:normal;",
"ct:oq": "content:open-quote;",
"ct:noq": "content:no-open-quote;",
"ct:cq": "content:close-quote;",
"ct:ncq": "content:no-close-quote;",
"ct:a": "content:attr(|);",
"ct:c": "content:counter(|);",
"ct:cs": "content:counters(|);",
coi: "counter-increment:|;",
cor: "counter-reset:|;",
va: "vertical-align:${1:top};",
"va:sup": "vertical-align:super;",
"va:t": "vertical-align:top;",
"va:tt": "vertical-align:text-top;",
"va:m": "vertical-align:middle;",
"va:bl": "vertical-align:baseline;",
"va:b": "vertical-align:bottom;",
"va:tb": "vertical-align:text-bottom;",
"va:sub": "vertical-align:sub;",
ta: "text-align:${1:left};",
"ta:l": "text-align:left;",
"ta:c": "text-align:center;",
"ta:r": "text-align:right;",
"ta:j": "text-align:justify;",
"ta-lst": "text-align-last:|;",
"tal:a": "text-align-last:auto;",
"tal:l": "text-align-last:left;",
"tal:c": "text-align-last:center;",
"tal:r": "text-align-last:right;",
td: "text-decoration:${1:none};",
"td:n": "text-decoration:none;",
"td:u": "text-decoration:underline;",
"td:o": "text-decoration:overline;",
"td:l": "text-decoration:line-through;",
te: "text-emphasis:|;",
"te:n": "text-emphasis:none;",
"te:ac": "text-emphasis:accent;",
"te:dt": "text-emphasis:dot;",
"te:c": "text-emphasis:circle;",
"te:ds": "text-emphasis:disc;",
"te:b": "text-emphasis:before;",
"te:a": "text-emphasis:after;",
th: "text-height:|;",
"th:a": "text-height:auto;",
"th:f": "text-height:font-size;",
"th:t": "text-height:text-size;",
"th:m": "text-height:max-size;",
ti: "text-indent:|;",
"ti:-": "text-indent:-9999px;",
tj: "text-justify:|;",
"tj:a": "text-justify:auto;",
"tj:iw": "text-justify:inter-word;",
"tj:ii": "text-justify:inter-ideograph;",
"tj:ic": "text-justify:inter-cluster;",
"tj:d": "text-justify:distribute;",
"tj:k": "text-justify:kashida;",
"tj:t": "text-justify:tibetan;",
tov: "text-overflow:${ellipsis};",
"tov:e": "text-overflow:ellipsis;",
"tov:c": "text-overflow:clip;",
to: "text-outline:|;",
"to+": "text-outline:${1:0} ${2:0} ${3:#000};",
"to:n": "text-outline:none;",
tr: "text-replace:|;",
"tr:n": "text-replace:none;",
tt: "text-transform:${1:uppercase};",
"tt:n": "text-transform:none;",
"tt:c": "text-transform:capitalize;",
"tt:u": "text-transform:uppercase;",
"tt:l": "text-transform:lowercase;",
tw: "text-wrap:|;",
"tw:n": "text-wrap:normal;",
"tw:no": "text-wrap:none;",
"tw:u": "text-wrap:unrestricted;",
"tw:s": "text-wrap:suppress;",
tsh: "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};",
"tsh:r": "text-shadow:${1:h} ${2:v} ${3:blur} rgb(${4:0}, ${5:0}, ${6:0});",
"tsh:ra": "text-shadow:${1:h} ${2:v} ${3:blur} rgba(${4:0}, ${5:0}, ${6:0}, .${7:5});",
"tsh+": "text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};",
"tsh:n": "text-shadow:none;",
trf: "transform:|;",
"trf:skx": "transform: skewX(${1:angle});",
"trf:sky": "transform: skewY(${1:angle});",
"trf:sc": "transform: scale(${1:x}, ${2:y});",
"trf:scx": "transform: scaleX(${1:x});",
"trf:scy": "transform: scaleY(${1:y});",
"trf:r": "transform: rotate(${1:angle});",
"trf:t": "transform: translate(${1:x}, ${2:y});",
"trf:tx": "transform: translateX(${1:x});",
"trf:ty": "transform: translateY(${1:y});",
trfo: "transform-origin:|;",
trfs: "transform-style:${1:preserve-3d};",
trs: "transition:${1:prop} ${2:time};",
trsde: "transition-delay:${1:time};",
trsdu: "transition-duration:${1:time};",
trsp: "transition-property:${1:prop};",
trstf: "transition-timing-function:${1:tfunc};",
lh: "line-height:|;",
whs: "white-space:|;",
"whs:n": "white-space:normal;",
"whs:p": "white-space:pre;",
"whs:nw": "white-space:nowrap;",
"whs:pw": "white-space:pre-wrap;",
"whs:pl": "white-space:pre-line;",
whsc: "white-space-collapse:|;",
"whsc:n": "white-space-collapse:normal;",
"whsc:k": "white-space-collapse:keep-all;",
"whsc:l": "white-space-collapse:loose;",
"whsc:bs": "white-space-collapse:break-strict;",
"whsc:ba": "white-space-collapse:break-all;",
wob: "word-break:|;",
"wob:n": "word-break:normal;",
"wob:k": "word-break:keep-all;",
"wob:l": "word-break:loose;",
"wob:bs": "word-break:break-strict;",
"wob:ba": "word-break:break-all;",
wos: "word-spacing:|;",
wow: "word-wrap:|;",
"wow:nm": "word-wrap:normal;",
"wow:n": "word-wrap:none;",
"wow:u": "word-wrap:unrestricted;",
"wow:s": "word-wrap:suppress;",
lts: "letter-spacing:|;",
f: "font:|;",
"f+": "font:${1:1em} ${2:Arial,sans-serif};",
fw: "font-weight:|;",
"fw:n": "font-weight:normal;",
"fw:b": "font-weight:bold;",
"fw:br": "font-weight:bolder;",
"fw:lr": "font-weight:lighter;",
fs: "font-style:${italic};",
"fs:n": "font-style:normal;",
"fs:i": "font-style:italic;",
"fs:o": "font-style:oblique;",
fv: "font-variant:|;",
"fv:n": "font-variant:normal;",
"fv:sc": "font-variant:small-caps;",
fz: "font-size:|;",
fza: "font-size-adjust:|;",
"fza:n": "font-size-adjust:none;",
ff: "font-family:|;",
"ff:s": "font-family:serif;",
"ff:ss": "font-family:sans-serif;",
"ff:c": "font-family:cursive;",
"ff:f": "font-family:fantasy;",
"ff:m": "font-family:monospace;",
fef: "font-effect:|;",
"fef:n": "font-effect:none;",
"fef:eg": "font-effect:engrave;",
"fef:eb": "font-effect:emboss;",
"fef:o": "font-effect:outline;",
fem: "font-emphasize:|;",
femp: "font-emphasize-position:|;",
"femp:b": "font-emphasize-position:before;",
"femp:a": "font-emphasize-position:after;",
fems: "font-emphasize-style:|;",
"fems:n": "font-emphasize-style:none;",
"fems:ac": "font-emphasize-style:accent;",
"fems:dt": "font-emphasize-style:dot;",
"fems:c": "font-emphasize-style:circle;",
"fems:ds": "font-emphasize-style:disc;",
fsm: "font-smooth:|;",
"fsm:a": "font-smooth:auto;",
"fsm:n": "font-smooth:never;",
"fsm:aw": "font-smooth:always;",
fst: "font-stretch:|;",
"fst:n": "font-stretch:normal;",
"fst:uc": "font-stretch:ultra-condensed;",
"fst:ec": "font-stretch:extra-condensed;",
"fst:c": "font-stretch:condensed;",
"fst:sc": "font-stretch:semi-condensed;",
"fst:se": "font-stretch:semi-expanded;",
"fst:e": "font-stretch:expanded;",
"fst:ee": "font-stretch:extra-expanded;",
"fst:ue": "font-stretch:ultra-expanded;",
op: "opacity:|;",
"op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);",
"op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",
rsz: "resize:|;",
"rsz:n": "resize:none;",
"rsz:b": "resize:both;",
"rsz:h": "resize:horizontal;",
"rsz:v": "resize:vertical;",
cur: "cursor:${pointer};",
"cur:a": "cursor:auto;",
"cur:d": "cursor:default;",
"cur:c": "cursor:crosshair;",
"cur:ha": "cursor:hand;",
"cur:he": "cursor:help;",
"cur:m": "cursor:move;",
"cur:p": "cursor:pointer;",
"cur:t": "cursor:text;",
pgbb: "page-break-before:|;",
"pgbb:au": "page-break-before:auto;",
"pgbb:al": "page-break-before:always;",
"pgbb:l": "page-break-before:left;",
"pgbb:r": "page-break-before:right;",
pgbi: "page-break-inside:|;",
"pgbi:au": "page-break-inside:auto;",
"pgbi:av": "page-break-inside:avoid;",
pgba: "page-break-after:|;",
"pgba:au": "page-break-after:auto;",
"pgba:al": "page-break-after:always;",
"pgba:l": "page-break-after:left;",
"pgba:r": "page-break-after:right;",
orp: "orphans:|;",
us: "user-select:${none};",
wid: "widows:|;",
wfsm: "-webkit-font-smoothing:${antialiased};",
"wfsm:a": "-webkit-font-smoothing:antialiased;",
"wfsm:s": "-webkit-font-smoothing:subpixel-antialiased;",
"wfsm:sa": "-webkit-font-smoothing:subpixel-antialiased;",
"wfsm:n": "-webkit-font-smoothing:none;"
}
},
html: {
filters: "html",
profile: "html",
snippets: {
"!!!": "<!doctype html>",
"!!!4t": '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
"!!!4s": '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
"!!!xt": '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
"!!!xs": '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
"!!!xxs": '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
c: "<!-- |${child} -->",
"cc:ie6": "<!--[if lte IE 6]>\n	${child}|\n<![endif]-->",
"cc:ie": "<!--[if IE]>\n	${child}|\n<![endif]-->",
"cc:noie": "<!--[if !IE]><!-->\n	${child}|\n<!--<![endif]-->"
},
abbreviations: {
"!": "html:5",
a: '<a href="">',
"a:link": '<a href="http://|">',
"a:mail": '<a href="mailto:|">',
abbr: '<abbr title="">',
acronym: '<acronym title="">',
base: '<base href="" />',
bdo: '<bdo dir="">',
"bdo:r": '<bdo dir="rtl">',
"bdo:l": '<bdo dir="ltr">',
link: '<link rel="stylesheet" href="" />',
"link:css": '<link rel="stylesheet" href="${1:style}.css" media="all" />',
"link:print": '<link rel="stylesheet" href="${1:print}.css" media="print" />',
"link:favicon": '<link rel="shortcut icon" type="image/x-icon" href="${1:favicon.ico}" />',
"link:touch": '<link rel="apple-touch-icon" href="${1:favicon.png}" />',
"link:rss": '<link rel="alternate" type="application/rss+xml" title="RSS" href="${1:rss.xml}" />',
"link:atom": '<link rel="alternate" type="application/atom+xml" title="Atom" href="${1:atom.xml}" />',
"meta:utf": '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />',
"meta:win": '<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />',
"meta:vp": '<meta name="viewport" content="width=${1:device-width}, user-scalable=${2:no}, initial-scale=${3:1.0}, maximum-scale=${4:1.0}, minimum-scale=${5:1.0}" />',
"meta:compat": '<meta http-equiv="X-UA-Compatible" content="${1:IE=7}" />',
style: "<style>",
script: "<script>",
"script:src": '<script src="">',
img: '<img src="" alt="" />',
iframe: '<iframe src="" frameborder="0">',
embed: '<embed src="" type="" />',
object: '<object data="" type="">',
param: '<param name="" value="" />',
map: '<map name="">',
area: '<area shape="" coords="" href="" alt="" />',
"area:d": '<area shape="default" href="" alt="" />',
"area:c": '<area shape="circle" coords="" href="" alt="" />',
"area:r": '<area shape="rect" coords="" href="" alt="" />',
"area:p": '<area shape="poly" coords="" href="" alt="" />',
form: '<form action="">',
"form:get": '<form action="" method="get">',
"form:post": '<form action="" method="post">',
label: '<label for="">',
input: '<input type="${1:text}" />',
inp: '<input type="${1:text}" name="" id="" />',
"input:hidden": "input[type=hidden name]",
"input:h": "input:hidden",
"input:text": "inp",
"input:t": "inp",
"input:search": "inp[type=search]",
"input:email": "inp[type=email]",
"input:url": "inp[type=url]",
"input:password": "inp[type=password]",
"input:p": "input:password",
"input:datetime": "inp[type=datetime]",
"input:date": "inp[type=date]",
"input:datetime-local": "inp[type=datetime-local]",
"input:month": "inp[type=month]",
"input:week": "inp[type=week]",
"input:time": "inp[type=time]",
"input:number": "inp[type=number]",
"input:color": "inp[type=color]",
"input:checkbox": "inp[type=checkbox]",
"input:c": "input:checkbox",
"input:radio": "inp[type=radio]",
"input:r": "input:radio",
"input:range": "inp[type=range]",
"input:file": "inp[type=file]",
"input:f": "input:file",
"input:submit": '<input type="submit" value="" />',
"input:s": "input:submit",
"input:image": '<input type="image" src="" alt="" />',
"input:i": "input:image",
"input:button": '<input type="button" value="" />',
"input:b": "input:button",
"input:reset": "input:button[type=reset]",
select: '<select name="" id="">',
option: '<option value="">',
textarea: '<textarea name="" id="" cols="${1:30}" rows="${2:10}">',
"menu:context": "menu[type=context]>",
"menu:c": "menu:context",
"menu:toolbar": "menu[type=toolbar]>",
"menu:t": "menu:toolbar",
video: '<video src="">',
audio: '<audio src="">',
"html:xml": '<html xmlns="http://www.w3.org/1999/xhtml">',
bq: "blockquote",
acr: "acronym",
fig: "figure",
figc: "figcaption",
ifr: "iframe",
emb: "embed",
obj: "object",
src: "source",
cap: "caption",
colg: "colgroup",
fst: "fieldset",
btn: "button",
optg: "optgroup",
opt: "option",
tarea: "textarea",
leg: "legend",
sect: "section",
art: "article",
hdr: "header",
ftr: "footer",
adr: "address",
dlg: "dialog",
str: "strong",
prog: "progress",
fset: "fieldset",
datag: "datagrid",
datal: "datalist",
kg: "keygen",
out: "output",
det: "details",
cmd: "command",
doc: "html>(head>meta[charset=UTF-8]+title{${1:Document}})+body",
doc4: 'html>(head>meta[http-equiv="Content-Type" content="text/html;charset=${charset}"]+title{${1:Document}})',
"html:4t": "!!!4t+doc4[lang=${lang}]",
"html:4s": "!!!4s+doc4[lang=${lang}]",
"html:xt": "!!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
"html:xs": "!!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
"html:xxs": "!!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
"html:5": "!!!+doc[lang=${lang}]",
"ol+": "ol>li",
"ul+": "ul>li",
"dl+": "dl>dt+dd",
"map+": "map>area",
"table+": "table>tr>td",
"colgroup+": "colgroup>col",
"colg+": "colgroup>col",
"tr+": "tr>td",
"select+": "select>option",
"optgroup+": "optgroup>option",
"optg+": "optgroup>option"
}
},
xml: {
"extends": "html",
profile: "xml",
filters: "html"
},
xsl: {
"extends": "html",
profile: "xml",
filters: "html, xsl",
abbreviations: {
tm: '<xsl:template match="" mode="">',
tmatch: "tm",
tn: '<xsl:template name="">',
tname: "tn",
call: '<xsl:call-template name=""/>',
ap: '<xsl:apply-templates select="" mode=""/>',
api: "<xsl:apply-imports/>",
imp: '<xsl:import href=""/>',
inc: '<xsl:include href=""/>',
ch: "<xsl:choose>",
"xsl:when": '<xsl:when test="">',
wh: "xsl:when",
ot: "<xsl:otherwise>",
"if": '<xsl:if test="">',
par: '<xsl:param name="">',
pare: '<xsl:param name="" select=""/>',
"var": '<xsl:variable name="">',
vare: '<xsl:variable name="" select=""/>',
wp: '<xsl:with-param name="" select=""/>',
key: '<xsl:key name="" match="" use=""/>',
elem: '<xsl:element name="">',
attr: '<xsl:attribute name="">',
attrs: '<xsl:attribute-set name="">',
cp: '<xsl:copy select=""/>',
co: '<xsl:copy-of select=""/>',
val: '<xsl:value-of select=""/>',
each: '<xsl:for-each select="">',
"for": "each",
tex: "<xsl:text></xsl:text>",
com: "<xsl:comment>",
msg: '<xsl:message terminate="no">',
fall: "<xsl:fallback>",
num: '<xsl:number value=""/>',
nam: '<namespace-alias stylesheet-prefix="" result-prefix=""/>',
pres: '<xsl:preserve-space elements=""/>',
strip: '<xsl:strip-space elements=""/>',
proc: '<xsl:processing-instruction name="">',
sort: '<xsl:sort select="" order=""/>',
"choose+": "xsl:choose>xsl:when+xsl:otherwise",
xsl: "!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}"
},
snippets: {
"!!!": '<?xml version="1.0" encoding="UTF-8"?>'
}
},
haml: {
filters: "haml",
"extends": "html",
profile: "xml"
},
scss: {
"extends": "css"
},
sass: {
"extends": "css"
},
less: {
"extends": "css"
},
stylus: {
"extends": "css"
}
}, "system")
}), emmet.define("cm-editor-proxy", function (a, b) {
function c() {
var b = j.getSyntax();
return a("resources").hasSyntax(b)
}

function d() {
if (CodeMirror.version >= "3.1") return CodeMirror.Pass;
throw CodeMirror.Pass
}

function e(b, e) {
if (j.setupContext(e), "expand_abbreviation_with_tab" == b && (j.getSelection() || !c())) return d();
var f = !0;
try {
var g = a("actions").run(b, j);
("next_edit_point" == b || "prev_edit_point" == b) && e.replaceSelection(""), g || "insert_formatted_line_break_only" != b || (f = !1)
} catch (h) {}
return f ? void 0 : d()
}
var f = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent),
g = f || /Mac/.test(navigator.platform),
h = {
"Cmd-E": "expand_abbreviation",
Tab: "expand_abbreviation_with_tab",
"Cmd-D": "match_pair_outward",
"Shift-Cmd-D": "match_pair_inward",
"Cmd-T": "matching_pair",
"Shift-Cmd-A": "wrap_with_abbreviation",
"Ctrl-Alt-Right": "next_edit_point",
"Ctrl-Alt-Left": "prev_edit_point",
"Cmd-L": "select_line",
"Cmd-Shift-M": "merge_lines",
"Cmd-/": "toggle_comment",
"Cmd-J": "split_join_tag",
"Cmd-K": "remove_tag",
"Shift-Cmd-Y": "evaluate_math_expression",
"Ctrl-Up": "increment_number_by_1",
"Ctrl-Down": "decrement_number_by_1",
"Alt-Up": "increment_number_by_01",
"Alt-Down": "decrement_number_by_01",
"Ctrl-Alt-Up": "increment_number_by_10",
"Ctrl-Alt-Down": "decrement_number_by_10",
"Shift-Cmd-.": "select_next_item",
"Shift-Cmd-,": "select_previous_item",
"Cmd-B": "reflect_css_value",
Enter: "insert_formatted_line_break_only"
}, i = {
"text/html": "html",
"application/xml": "xml",
"text/xsl": "xsl",
"text/css": "css",
"text/x-less": "less"
};
CodeMirror.defineOption ? CodeMirror.defineOption("profile", "html") : CodeMirror.defaults.profile = "html";
var j = {
context: null,
getSelectionRange: function () {
var a = this.getCaretPos();
return {
start: a,
end: a + this.getSelection().length
}
},
createSelection: function (a, b) {
a == b ? this.context.setCursor(this.context.posFromIndex(a)) : this.context.setSelection(this.context.posFromIndex(a), this.context.posFromIndex(b))
},
getCurrentLineRange: function () {
var a = this.context.getCursor(!0);
return {
start: this.context.indexFromPos({
line: a.line,
ch: 0
}),
end: this.context.indexFromPos({
line: a.line,
ch: this.context.getLine(a.line).length
})
}
},
getCaretPos: function () {
return this.context.indexFromPos(this.context.getCursor(!0))
},
setCaretPos: function (a) {
this.createSelection(a, a)
},
getCurrentLine: function () {
return this.context.getLine(this.context.getCursor(!0).line) || ""
},
replaceContent: function (c, d, e, f) {
b.isUndefined(e) && (e = b.isUndefined(d) ? content.length : d), b.isUndefined(d) && (d = 0);
var g = a("utils");
f || (c = g.padString(c, g.getLinePaddingFromPosition(this.getContent(), d)));
var h = a("tabStops").extract(c, {
escape: function (a) {
return a
}
});
c = h.text;
var i = h.tabstops[0];
i ? (i.start += d, i.end += d) : i = {
start: c.length + d,
end: c.length + d
};
var j = this,
k = this.context.operation || this.context.compoundChange;
k.call(this.context, function () {
j.context.replaceRange(c, j.context.posFromIndex(d), j.context.posFromIndex(e)), j.createSelection(i.start, i.end)
})
},
getContent: function () {
return this.context.getValue()
},
getSyntax: function () {
var b = this.context.getOption("mode");
return b in i && (b = i[b]), a("actionUtils").detectSyntax(this, b)
},
getProfileName: function () {
return this.context.getOption("profile") ? this.context.getOption("profile") : a("actionUtils").detectProfile(this)
},
prompt: function (a) {
return prompt(a)
},
getSelection: function () {
return this.context.getSelection() || ""
},
getFilePath: function () {
return location.href
},
setupContext: function (b) {
this.context = b;
var c = "	";
b.getOption("indentWithTabs") || (c = a("utils").repeatString(" ", b.getOption("indentUnit"))), a("resources").setVariable("indentation", c)
},
addAction: function (a, b, c) {
var d = "emmet." + a;
CodeMirror.commands[d] || (CodeMirror.commands[d] = function (b) {
return e(a, b)
}), b && (c || (CodeMirror.keyMap && CodeMirror.keyMap["default"] ? c = CodeMirror.keyMap["default"] : (CodeMirror.defaults.extraKeys || (CodeMirror.defaults.extraKeys = {}), c = CodeMirror.defaults.extraKeys)), g || (b = b.replace("Cmd", "Ctrl")), c && (c[b] = d))
}
};
return "undefined" != typeof emmetKeymap && (h = emmetKeymap), b.each(h, function (a, b) {
j.addAction(a, b)
}), j
}),
function () {
function a(a, c, d, e) {
if (this.atOccurrence = !1, this.cm = a, null == e && "string" == typeof c && (e = !1), d = d ? a.clipPos(d) : b(0, 0), this.pos = {
from: d,
to: d
}, "string" != typeof c) c.global || (c = new RegExp(c.source, c.ignoreCase ? "ig" : "g")), this.matches = function (d, e) {
if (d) {
c.lastIndex = 0;
for (var f = a.getLine(e.line).slice(0, e.ch), g = c.exec(f), h = 0; g;) {
h += g.index + 1, f = f.slice(h), c.lastIndex = 0;
var i = c.exec(f);
if (!i) break;
g = i
}
h--
} else {
c.lastIndex = e.ch;
var f = a.getLine(e.line),
g = c.exec(f),
h = g && g.index
}
return g && g[0] ? {
from: b(e.line, h),
to: b(e.line, h + g[0].length),
match: g
} : void 0
};
else {
e && (c = c.toLowerCase());
var f = e ? function (a) {
return a.toLowerCase()
} : function (a) {
return a
}, g = c.split("\n");
this.matches = 1 == g.length ? c.length ? function (d, e) {
var g, h = f(a.getLine(e.line)),
i = c.length;
return (d ? e.ch >= i && -1 != (g = h.lastIndexOf(c, e.ch - i)) : -1 != (g = h.indexOf(c, e.ch))) ? {
from: b(e.line, g),
to: b(e.line, g + i)
} : void 0
} : function () {} : function (c, d) {
var e = d.line,
h = c ? g.length - 1 : 0,
i = g[h],
j = f(a.getLine(e)),
k = c ? j.indexOf(i) + i.length : j.lastIndexOf(i);
if (!(c ? k >= d.ch || k != i.length : k <= d.ch || k != j.length - i.length))
for (;;) {
if (c ? !e : e == a.lineCount() - 1) return;
if (j = f(a.getLine(e += c ? -1 : 1)), i = g[c ? --h : ++h], !(h > 0 && h < g.length - 1)) {
var l = c ? j.lastIndexOf(i) : j.indexOf(i) + i.length;
if (c ? l != j.length - i.length : l != i.length) return;
var m = b(d.line, k),
n = b(e, l);
return {
from: c ? n : m,
to: c ? m : n
}
}
if (j != i) return
}
}
}
}
var b = CodeMirror.Pos;
a.prototype = {
findNext: function () {
return this.find(!1)
},
findPrevious: function () {
return this.find(!0)
},
find: function (a) {
function c(a) {
var c = b(a, 0);
return d.pos = {
from: c,
to: c
}, d.atOccurrence = !1, !1
}
for (var d = this, e = this.cm.clipPos(a ? this.pos.from : this.pos.to);;) {
if (this.pos = this.matches(a, e)) return this.pos.from && this.pos.to || console.log(this.matches, this.pos), this.atOccurrence = !0, this.pos.match || !0;
if (a) {
if (!e.line) return c(0);
e = b(e.line - 1, this.cm.getLine(e.line - 1).length)
} else {
var f = this.cm.lineCount();
if (e.line == f - 1) return c(f);
e = b(e.line + 1, 0)
}
}
},
from: function () {
return this.atOccurrence ? this.pos.from : void 0
},
to: function () {
return this.atOccurrence ? this.pos.to : void 0
},
replace: function (a) {
if (this.atOccurrence) {
var c = CodeMirror.splitLines(a);
this.cm.replaceRange(c, this.pos.from, this.pos.to), this.pos.to = b(this.pos.from.line + c.length - 1, c[c.length - 1].length + (1 == c.length ? this.pos.from.ch : 0))
}
}
}, CodeMirror.defineExtension("getSearchCursor", function (b, c, d) {
return new a(this, b, c, d)
})
}(),
function () {
CodeMirror.simpleHint = function (a, b, c) {
function d(f) {
function g(b) {
a.replaceRange(b, k.from, k.to)
}

function h() {
s || (s = !0, m.parentNode.removeChild(m))
}

function i() {
g(l[n.selectedIndex]), h(), setTimeout(function () {
a.focus()
}, 50)
}
if (!a.somethingSelected()) {
var j = a.getTokenAt(a.getCursor());
if ("html" === j.state.mode || "" === j.string.trim()) return CodeMirror.Pass;
if (!e.closeOnTokenChange || null == f || j.start == f.start && j.type == f.type) {
var k = b(a, c);
if (k && k.list.length) {
var l = k.list;
if (e.completeSingle && 1 == l.length) return g(l[0]), !0;
var m = document.createElement("div");
m.className = "CodeMirror-completions";
var n = m.appendChild(document.createElement("select"));
window.opera || (n.multiple = !0);
for (var o = 0; o < l.length; ++o) {
var p = n.appendChild(document.createElement("option"));
p.appendChild(document.createTextNode(l[o]))
}
n.firstChild.selected = !0, n.size = Math.min(10, l.length);
var q = a.cursorCoords(e.alignWithWord ? k.from : null);
m.style.left = q.left + "px", m.style.top = q.bottom + "px", document.body.appendChild(m);
var r = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);
r - q.left < n.clientWidth && (m.style.left = q.left - n.clientWidth + "px"), l.length <= 10 && (m.style.width = n.clientWidth - 1 + "px");
var s = !1;
return CodeMirror.on(n, "blur", h), CodeMirror.on(n, "keydown", function (b) {
var c = b.keyCode;
13 == c ? (CodeMirror.e_stop(b), i()) : 27 == c ? (CodeMirror.e_stop(b), h(), a.focus()) : 38 == c || 40 == c || 33 == c || 34 == c || CodeMirror.isModifierKey(b) || (h(), a.focus(), a.triggerOnKeyDown(b), e.closeOnBackspace && 8 == c || setTimeout(function () {
d(j)
}, 50))
}), CodeMirror.on(n, "dblclick", i), n.focus(), window.opera && setTimeout(function () {
s || n.focus()
}, 100), !0
}
}
}
}
var e = {}, f = CodeMirror.simpleHint.defaults;
for (var g in f) f.hasOwnProperty(g) && (e[g] = (c && c.hasOwnProperty(g) ? c : f)[g]);
return d()
}, CodeMirror.simpleHint.defaults = {
closeOnBackspace: !0,
closeOnTokenChange: !1,
completeSingle: !0,
alignWithWord: !0
}
}(),
function () {
function a(a, b) {
for (var c = 0, d = a.length; d > c; ++c) b(a[c])
}

function b(a, b) {
if (!Array.prototype.indexOf) {
for (var c = a.length; c--;)
if (a[c] === b) return !0;
return !1
}
return -1 != a.indexOf(b)
}

function c(a, b, c, d) {
var g = a.getCursor(),
h = c(a, g),
i = h;
for (/^[\w$_]*$/.test(h.string) || (h = i = {
start: g.ch,
end: g.ch,
string: "",
state: h.state,
type: "." == h.string ? "property" : null
});
"property" == i.type;) {
if (i = c(a, f(g.line, i.start)), "." != i.string) return;
if (i = c(a, f(g.line, i.start)), ")" == i.string) {
var j = 1;
do switch (i = c(a, f(g.line, i.start)), i.string) {
case ")":
j++;
break;
case "(":
j--
}
while (j > 0);
if (i = c(a, f(g.line, i.start)), 0 !== i.type.indexOf("variable")) return;
i.type = "function"
}
if (!k) var k = [];
k.push(i)
}
return {
list: e(h, k, b, d),
from: f(g.line, h.start),
to: f(g.line, h.end)
}
}

function d(a, b) {
var c = a.getTokenAt(b);
return b.ch == c.start + 1 && "." == c.string.charAt(0) ? (c.end = c.start, c.string = ".", c.type = "property") : /^\.[\w$_]*$/.test(c.string) && (c.type = "property", c.start++, c.string = c.string.replace(/\./, "")), c
}

function e(c, d, e, f) {
function j(a) {
0 != a.indexOf(m) || b(l, a) || a === m || l.push(a)
}

function k(b) {
"string" == typeof b ? a(g, j) : b instanceof Array ? a(h, j) : b instanceof Function && a(i, j);
for (var c in b) j(c)
}
var l = [],
m = c.string;
if (d) {
var n, o = d.pop();
for (0 === o.type.indexOf("variable") ? (f && f.additionalContext && (n = f.additionalContext[o.string]), n = n || window[o.string]) : "string" == o.type ? n = "" : "atom" == o.type ? n = 1 : "function" == o.type && (null == window.jQuery || "$" != o.string && "jQuery" != o.string || "function" != typeof window.jQuery ? null != window._ && "_" == o.string && "function" == typeof window._ && (n = window._()) : n = window.jQuery()); null != n && d.length;) n = n[d.pop().string];
null != n && k(n), 0 === l.length && a(e, j)
} else {
for (var p = c.state.localVars; p; p = p.next) j(p.name);
for (var p = c.state.globalVars; p; p = p.next) j(p.name);
k(window), a(e, j)
}
return l
}
var f = CodeMirror.Pos;
CodeMirror.javascriptHint = function (a, b) {
var d = dedupe(j.concat(a.getCode().replace(/\W/g, " ").replace(/\s+/g, " ").trim().split(" "))).sort(function (a, b) {
return a.toLowerCase() < b.toLowerCase() ? -1 : 1
}),
e = a.getCursor(),
f = a.getTokenAt(e);
return d.splice(d.indexOf(f.string), 1), c(a, d, function (a, b) {
return a.getTokenAt(b)
}, b)
}, CodeMirror.coffeescriptHint = function (a, b) {
return c(a, k, d, b)
};
var g = "charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),
h = "length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),
i = "prototype apply call bind".split(" "),
j = "break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with".split(" "),
k = "and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")
}(),
function () {
function a(a) {
function b(b, c, d) {
if (b.text) {
var f = j ? 0 : b.text.length - 1,
h = j ? b.text.length : -1;
for (null != d && (f = d + k); f != h; f += k) {
var i = b.text.charAt(f);
if (n.test(i) && a.getTokenAt(e(c, f + 1)).type == l) {
var o = g[i];
if (">" == o.charAt(1) == j) m.push(i);
else {
if (m.pop() != o.charAt(0)) return {
pos: f,
match: !1
};
if (!m.length) return {
pos: f,
match: !0
}
}
}
}
}
}
var c = a.getCursor(),
d = a.getLineHandle(c.line),
f = c.ch - 1,
h = f >= 0 && g[d.text.charAt(f)] || g[d.text.charAt(++f)];
if (!h) return null;
for (var i, j = ">" == h.charAt(1), k = j ? 1 : -1, l = a.getTokenAt(e(c.line, f + 1)).type, m = [d.text.charAt(f)], n = /[(){}[\]]/, o = c.line, p = j ? Math.min(o + 100, a.lineCount()) : Math.max(-1, o - 100); o != p && !(i = o == c.line ? b(d, o, f) : b(a.getLineHandle(o), o)); o += k);
return {
from: e(c.line, f),
to: i && e(o, i.pos),
match: i && i.match
}
}

function b(b, c) {
var g = a(b);
if (!(!g || b.getLine(g.from.line).length > f || g.to && b.getLine(g.to.line).length > f)) {
var h = g.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket",
i = b.markText(g.from, e(g.from.line, g.from.ch + 1), {
className: h
}),
j = g.to && b.markText(g.to, e(g.to.line, g.to.ch + 1), {
className: h
});
d && b.state.focused && b.display.input.focus();
var k = function () {
b.operation(function () {
i.clear(), j && j.clear()
})
};
return c ? (setTimeout(k, 800), void 0) : k
}
}

function c(a) {
a.operation(function () {
h && (h(), h = null), a.somethingSelected() || (h = b(a, !1))
})
}
var d = /MSIE \d/.test(navigator.userAgent) && (null == document.documentMode || document.documentMode < 8),
e = CodeMirror.Pos,
f = 1e3,
g = {
"(": ")>",
")": "(<",
"[": "]>",
"]": "[<",
"{": "}>",
"}": "{<"
}, h = null;
CodeMirror.defineOption("matchBrackets", !1, function (a, b) {
b ? a.on("cursorActivity", c) : a.off("cursorActivity", c)
}), CodeMirror.defineExtension("matchBrackets", function () {
b(this, !0)
}), CodeMirror.defineExtension("findMatchingBracket", function () {
return a(this)
})
}(), CodeMirror.tagRangeFinder = function (a, b) {
for (var c = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", d = c + "-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040", e = new RegExp("^[" + c + "][" + d + "]*"), f = a.getLine(b.line), g = !1, h = null, i = b.ch; !g;) {
if (i = f.indexOf("<", i), -1 == i) return;
if (i + 1 < f.length && "/" == f[i + 1]) i++;
else if (f.substr(i + 1).match(e)) {
var j = f.indexOf(">", i + 1);
if (-1 == j) {
for (var k = b.line + 1, l = !1, m = a.lineCount(); m > k && !l;) {
var n = a.getLine(k);
if (j = n.indexOf(">"), -1 != j) {
l = !0;
var o = n.lastIndexOf("/", j);
if (-1 != o && j > o) {
var p = f.substr(o, j - o + 1);
if (!p.match(/\/\s*\>/)) return
}
}
k++
}
g = !0
} else {
var q = f.lastIndexOf("/", j);
if (-1 == q) g = !0;
else {
var p = f.substr(q, j - q + 1);
p.match(/\/\s*\>/) || (g = !0)
}
} if (g) {
var r = f.substr(i + 1);
h = r.match(e), h ? (h = h[0], -1 != f.indexOf("</" + h + ">", i) && (g = !1)) : g = !1
}
g || i++
} else i++
}
if (g)
for (var s = "(\\<\\/" + h + "\\>)|(\\<" + h + "\\>)|(\\<" + h + "\\s)|(\\<" + h + "$)", t = new RegExp(s), u = "</" + h + ">", v = 1, k = b.line + 1, m = a.lineCount(); m > k;) {
f = a.getLine(k);
var w = f.match(t);
if (w)
for (var x = 0; x < w.length; x++)
if (w[x] == u ? v-- : v++, !v) return {
from: CodeMirror.Pos(b.line, j + 1),
to: CodeMirror.Pos(k, w.index)
};
k++
} else;
}, CodeMirror.braceRangeFinder = function (a, b) {
for (var c, d, e = b.line, f = a.getLine(e), g = f.length;;) {
var h = f.lastIndexOf("{", g);
if (h < b.ch) break;
if (d = a.getTokenAt(CodeMirror.Pos(e, h + 1)).type, !/^(comment|string)/.test(d)) {
c = h;
break
}
g = h - 1
}
if (!(null == c || f.lastIndexOf("}") > c)) {
var i, j, k = 1,
l = a.lineCount();
a: for (var m = e + 1; l > m; ++m)
for (var n = a.getLine(m), o = 0;;) {
var p = n.indexOf("{", o),
q = n.indexOf("}", o);
if (0 > p && (p = n.length), 0 > q && (q = n.length), o = Math.min(p, q), o == n.length) break;
if (a.getTokenAt(CodeMirror.Pos(m, o + 1)).type == d)
if (o == p)++k;
else if (!--k) {
i = m, j = o;
break a
}++o
}
if (null != i && i != e + 1) return {
from: CodeMirror.Pos(e, c + 1),
to: CodeMirror.Pos(i, j)
}
}
}, CodeMirror.indentRangeFinder = function (a, b) {
for (var c = a.getOption("tabSize"), d = a.getLine(b.line), e = CodeMirror.countColumn(d, null, c), f = b.line + 1, g = a.lineCount(); g > f; ++f) {
var h = a.getLine(f);
if (CodeMirror.countColumn(h, null, c) < e && CodeMirror.countColumn(a.getLine(f - 1), null, c) > e) return {
from: CodeMirror.Pos(b.line, d.length),
to: CodeMirror.Pos(f, h.length)
}
}
}, CodeMirror.newFoldFunction = function (a, b) {
if (null == b && (b = "↔"), "string" == typeof b) {
var c = document.createTextNode(b);
b = document.createElement("span"), b.appendChild(c), b.className = "CodeMirror-foldmarker"
}
return function (c, d) {
"number" == typeof d && (d = CodeMirror.Pos(d, 0));
var e = a(c, d);
if (e) {
for (var f = c.findMarksAt(e.from), g = 0, h = 0; h < f.length; ++h) f[h].__isFold && (++g, f[h].clear());
if (!g) {
var i = b.cloneNode(!0);
CodeMirror.on(i, "mousedown", function () {
j.clear()
});
var j = c.markText(e.from, e.to, {
replacedWith: i,
clearOnEnter: !0,
__isFold: !0
})
}
}
}
},
function () {
"use strict";

function a(a) {
"_activeLine" in a && (a.removeLineClass(a._activeLine, "wrap", c), a.removeLineClass(a._activeLine, "background", d))
}

function b(b) {
var e = b.getLineHandle(b.getCursor().line);
b._activeLine != e && (a(b), b.addLineClass(e, "wrap", c), b.addLineClass(e, "background", d), b._activeLine = e)
}
var c = "CodeMirror-activeline",
d = "CodeMirror-activeline-background";
CodeMirror.defineOption("styleActiveLine", !1, function (c, d, e) {
var f = e && e != CodeMirror.Init;
d && !f ? (b(c), c.on("cursorActivity", b)) : !d && f && (c.off("cursorActivity", b), a(c), delete c._activeLine)
})
}(),
function () {
function a(a) {
this.minChars = "object" == typeof a && a.minChars || d, this.style = "object" == typeof a && a.style || e, this.overlay = null
}

function b(a) {
a.operation(function () {
var b = a._matchHighlightState;
if (b.overlay && (a.removeOverlay(b.overlay), b.overlay = null), a.somethingSelected()) {
var d = a.getSelection().replace(/^\s+|\s+$/g, "");
d.length < b.minChars || a.addOverlay(b.overlay = c(d, b.style))
}
})
}

function c(a, b) {
return {
token: function (c) {
return c.match(a) ? b : (c.next(), c.skipTo(a.charAt(0)) || c.skipToEnd(), void 0)
}
}
}
var d = 2,
e = "matchhighlight";
CodeMirror.defineOption("highlightSelectionMatches", !1, function (c, d, e) {
var f = e && e != CodeMirror.Init;
if (d && !f) c._matchHighlightState = new a(d), c.on("cursorActivity", b);
else if (!d && f) {
var g = c._matchHighlightState.overlay;
g && c.removeOverlay(g), c._matchHighlightState = null, c.off("cursorActivity", b)
}
})
}();
var JSON;
JSON || (JSON = {}),
function () {
"use strict";

function f(a) {
return 10 > a ? "0" + a : a
}

function quote(a) {
return escapable.lastIndex = 0, escapable.test(a) ? '"' + a.replace(escapable, function (a) {
var b = meta[a];
return "string" == typeof b ? b : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
}) + '"' : '"' + a + '"'
}

function str(a, b) {
var c, d, e, f, g, h = gap,
i = b[a];
switch (i && "object" == typeof i && "function" == typeof i.toJSON && (i = i.toJSON(a)), "function" == typeof rep && (i = rep.call(b, a, i)), typeof i) {
case "string":
return quote(i);
case "number":
return isFinite(i) ? String(i) : "null";
case "boolean":
case "null":
return String(i);
case "object":
if (!i) return "null";
if (gap += indent, g = [], "[object Array]" === Object.prototype.toString.apply(i)) {
for (f = i.length, c = 0; f > c; c += 1) g[c] = str(c, i) || "null";
return e = 0 === g.length ? "[]" : gap ? "[\n" + gap + g.join(",\n" + gap) + "\n" + h + "]" : "[" + g.join(",") + "]", gap = h, e
}
if (rep && "object" == typeof rep)
for (f = rep.length, c = 0; f > c; c += 1) "string" == typeof rep[c] && (d = rep[c], e = str(d, i), e && g.push(quote(d) + (gap ? ": " : ":") + e));
else
for (d in i) Object.prototype.hasOwnProperty.call(i, d) && (e = str(d, i), e && g.push(quote(d) + (gap ? ": " : ":") + e));
return e = 0 === g.length ? "{}" : gap ? "{\n" + gap + g.join(",\n" + gap) + "\n" + h + "}" : "{" + g.join(",") + "}", gap = h, e
}
}
"function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function () {
return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null
}, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function () {
return this.valueOf()
});
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap, indent, meta = {
"\b": "\\b",
"	": "\\t",
"\n": "\\n",
"\f": "\\f",
"\r": "\\r",
'"': '\\"',
"\\": "\\\\"
}, rep;
"function" != typeof JSON.stringify && (JSON.stringify = function (a, b, c) {
var d;
if (gap = "", indent = "", "number" == typeof c)
for (d = 0; c > d; d += 1) indent += " ";
else "string" == typeof c && (indent = c); if (rep = b, b && "function" != typeof b && ("object" != typeof b || "number" != typeof b.length)) throw new Error("JSON.stringify");
return str("", {
"": a
})
}), "function" != typeof JSON.parse && (JSON.parse = function (text, reviver) {
function walk(a, b) {
var c, d, e = a[b];
if (e && "object" == typeof e)
for (c in e) Object.prototype.hasOwnProperty.call(e, c) && (d = walk(e, c), void 0 !== d ? e[c] = d : delete e[c]);
return reviver.call(a, b, e)
}
var j;
if (text = String(text), cx.lastIndex = 0, cx.test(text) && (text = text.replace(cx, function (a) {
return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
})), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"), "function" == typeof reviver ? walk({
"": j
}, "") : j;
throw new SyntaxError("JSON.parse")
})
}(),
function () {
function a(a, b) {
if (void 0 === b) throw new Error("BAD");
if ("number" != typeof a) throw new Error("BAD");
this.end = a, this.style = b
}

function b(a, b) {
if (void 0 === b) throw new Error("BAD");
this.token = a, this.style = b
}

function c() {
this.next = 0, this.ch = "\0"
}

function d(a) {
return a >= "a" && "z" >= a || a >= "A" && "Z" >= a
}

function e(a) {
return d(a) || "_" == a || "$" == a || "@" == a
}

function f(a) {
return e(a) || h(a)
}

function g(a) {
return "	 \r\n".indexOf(a) >= 0
}

function h(a) {
return a >= "0" && "9" >= a
}

function i(a) {
for (var b = 0, c = a.length - 1; c >= b && g(a.charAt(b));)++b;
for (; c > b && g(a.charAt(c));)--c;
return a.substring(b, c + 1)
}

function j(a, b) {
return a.length >= b.length && b == a.substring(0, b.length)
}

function k(a, b) {
return a.length >= b.length && b == a.substring(a.length - b.length, a.length)
}

function l(a, b, c) {
if (b < c.length) return !1;
b = 0;
for (var d = c.length; d > b; ++b)
if (c.charAt(b) != a[b]) return !1;
return !0
}

function m(a) {
return a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\"/g, "&quot;").replace(/\xa0/, "&nbsp;")
}

function n(a) {
return a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\xa0/g, "&nbsp;")
}

function o(a) {
return "XMP" == a.tagName
}

function p(a) {
if (null == W) {
var b = document.createElement("PRE");
b.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')), W = !/</.test(b.innerHTML)
}
if (W) return b = a.innerHTML, o(a) && (b = n(b)), b;
for (b = [], a = a.firstChild; a; a = a.nextSibling) q(a, b);
return b.join("")
}

function q(a, b) {
switch (a.nodeType) {
case 1:
var c = a.tagName.toLowerCase();
b.push("<", c);
for (var d = 0; d < a.attributes.length; ++d) {
var e = a.attributes[d];
e.specified && (b.push(" "), q(e, b))
}
for (b.push(">"), d = a.firstChild; d; d = d.nextSibling) q(d, b);
(a.firstChild || !/^(?:br|link|img)$/.test(c)) && b.push("</", c, ">");
break;
case 2:
b.push(a.name.toLowerCase(), '="', m(a.value), '"');
break;
case 3:
case 4:
b.push(n(a.nodeValue))
}
}

function r(a, d) {
for (var e = 0, f = new c, g = [], h = 0; h < a.length; ++h) {
var i = a[h];
if (null == i.style) g.push(i);
else {
for (var j = i.token, k = 0, l = [], m = 0, n = j.length; n > m; m = f.next) switch (f.decode(j, m), f.ch) {
case "	":
for (l.push(j.substring(k, m)), k = d - e % d, e += k; k >= 0; k -= 16) l.push("                ".substring(0, k));
k = f.next;
break;
case "\n":
case "\r":
e = 0;
break;
default:
++e
}
l.push(j.substring(k)), g.push(new b(l.join(""), i.style))
}
}
return g
}

function s(a) {
a = a.match(/(?:[^<]+|<\/?[a-zA-Z][^>]*>|<)/g);
var c = [];
if (a)
for (var d = null, e = 0, f = a.length; f > e; ++e) {
var g = a[e];
if (g.length < 2 || "<" !== g.charAt(0)) {
if (d && d.style === O) {
d.token += g;
continue
}
d = O
} else d = null;
d = new b(g, d), c.push(d)
}
return c
}

function t(a, c) {
for (var d = [], e = 0, f = 0, g = 0, h = new b("", null), i = 0, j = c.length; j > i; ++i) {
var k = c[i],
l = k.end;
if (0 !== l) {
for (var m = l - f, n = h.token.length - g; m >= n;) n > 0 && d.push(new b(h.token.substring(g, h.token.length), null == h.style ? null : k.style)), f += n, g = 0, e < a.length && (h = a[e++]), m = l - f, n = h.token.length - g;
m && (d.push(new b(h.token.substring(g, g + m), k.style)), f += m, g += m)
}
}
return d
}

function u(b) {
for (var e = [], f = 0, g = 0, h = -1, i = new Array(12), j = 0, k = null, m = new c, n = 0, o = b.length; o > n; ++n) {
var p = b[n];
if (O == p.style)
for (var q = p.token, r = 0, s = q.length; s > r;) {
m.decode(q, r);
var t = m.ch,
u = m.next,
v = null;
switch (f) {
case 0:
"<" == t && (f = 1);
break;
case 1:
j = 0, "/" == t ? f = 7 : null == k ? "!" == t ? f = 2 : d(t) ? f = 8 : "?" == t ? f = 9 : "%" == t ? f = 11 : "<" != t && (f = 0) : "<" != t && (f = 0);
break;
case 2:
f = "-" == t ? 4 : d(t) ? 3 : "<" == t ? 1 : 0;
break;
case 3:
">" == t && (f = 0, v = Q);
break;
case 4:
"-" == t && (f = 5);
break;
case 5:
"-" == t && (f = 6);
break;
case 6:
">" == t ? (f = 0, v = K) : f = "-" == t ? 6 : 4;
break;
case 7:
f = d(t) ? 8 : "<" == t ? 1 : 0;
break;
case 8:
">" == t && (f = 0, v = P);
break;
case 9:
"?" == t && (f = 10);
break;
case 10:
">" == t ? (f = 0, v = R) : "?" != t && (f = 9);
break;
case 11:
"%" == t && (f = 12);
break;
case 12:
">" == t ? (f = 0, v = R) : "%" != t && (f = 11)
}
j < i.length && (i[j++] = t.toLowerCase()), 1 == f && (h = g + r), r = u, null != v && (null != v && (k ? l(i, j, k) && (k = null) : l(i, j, "script") ? k = "/script" : l(i, j, "style") ? k = "/style" : l(i, j, "xmp") && (k = "/xmp"), k && j && "/" == i[0] && (v = null)), null != v && (e.push(new a(h, O)), e.push(new a(g + u, v))))
}
g += p.token.length
}
return e.push(new a(g, O)), e
}

function v(b) {
for (var d = [], e = 0, f = -1, g = 0, h = 0, i = b.length; i > h; ++h) {
var j = b[h],
k = j.token;
if (O == j.style) {
j = new c;
for (var l, m = -1, n = 0, o = k.length; o > n; m = n, n = l) {
j.decode(k, n);
var p = j.ch;
l = j.next, 0 == e ? '"' == p || "'" == p || "`" == p ? (d.push(new a(g + n, O)), e = 1, f = p) : "/" == p ? e = 3 : "#" == p && (d.push(new a(g + n, O)), e = 4) : 1 == e ? p == f ? (e = 0, d.push(new a(g + l, I))) : "\\" == p && (e = 2) : 2 == e ? e = 1 : 3 == e ? "/" == p ? (e = 4, d.push(new a(g + m, O))) : "*" == p ? (e = 5, d.push(new a(g + m, O))) : (e = 0, l = n) : 4 == e ? ("\r" == p || "\n" == p) && (e = 0, d.push(new a(g + n, K))) : 5 == e ? "*" == p && (e = 6) : 6 == e && ("/" == p ? (e = 0, d.push(new a(g + l, K))) : "*" != p && (e = 5))
}
}
g += k.length
}
switch (e) {
case 1:
case 2:
e = I;
break;
case 4:
case 5:
case 6:
e = K;
break;
default:
e = O
}
return d.push(new a(g, e)), t(b, d)
}

function w(a, i) {
for (var j, k = 0, l = 0, m = new c, n = 0; n <= a.length; n = j) {
if (n == a.length) p = -2, j = n + 1;
else {
m.decode(a, n), j = m.next;
var o = m.ch,
p = l;
switch (l) {
case 0:
e(o) ? p = 1 : h(o) ? p = 2 : g(o) || (p = 3), p && n > k && (o = a.substring(k, n), i.push(new b(o, O)), k = n);
break;
case 1:
f(o) || (p = -1);
break;
case 2:
h(o) || d(o) || "_" == o || (p = -1);
break;
case 3:
(e(o) || h(o) || g(o)) && (p = -1)
}
} if (p != l) {
if (0 > p) {
if (n > k) {
o = a.substring(k, n), k = new c, k.decode(o, 0);
var q = k.ch;
if (l = k.next == o.length, e(q))
if (H[o]) l = J;
else if ("@" === q) l = M;
else {
var r = !1;
if (q >= "A" && "Z" >= q) {
for (q = k.next; q < o.length; q = k.next)
if (k.decode(o, q), q = k.ch, q >= "a" && "z" >= q) {
r = !0;
break
}
r || l || "_t" != o.substring(o.length - 2) || (r = !0)
}
l = r ? L : O
} else l = h(q) ? M : g(q) ? O : N;
k = n, i.push(new b(o, l))
}
if (l = 0, -1 == p) {
j = n;
continue
}
}
l = p
}
}
}

function x(a) {
if (!a || !a.length) return a;
var b = u(a);
return t(a, b)
}

function y(a) {
for (var d = [], e = 0, f = P, h = null, i = new c, j = 0; j < a.length; ++j) {
var k = a[j];
if (P == k.style) {
k = k.token;
for (var l = 0, m = 0; m < k.length;) {
i.decode(k, m);
var n = i.ch,
o = i.next,
p = null,
q = null;
if (">" == n) P != f && (p = m, q = P);
else switch (e) {
case 0:
"<" == n && (e = 1);
break;
case 1:
g(n) && (e = 2);
break;
case 2:
g(n) || (q = S, p = m, e = 3);
break;
case 3:
"=" == n ? (p = m, q = P, e = 5) : g(n) && (p = m, q = P, e = 4);
break;
case 4:
"=" == n ? e = 5 : g(n) || (p = m, q = S, e = 3);
break;
case 5:
'"' == n || "'" == n ? (p = m, q = T, e = 6, h = n) : g(n) || (p = m, q = T, e = 7);
break;
case 6:
n == h && (p = o, q = P, e = 2);
break;
case 7:
g(n) && (p = m, q = P, e = 2)
}
p && (p > l && (d.push(new b(k.substring(l, p), f)), l = p), f = q), m = o
}
k.length > l && d.push(new b(k.substring(l, k.length), f))
} else k.style && (e = 0, f = P), d.push(k)
}
return d
}

function z(a) {
for (var d = [], e = null, f = new c, g = null, h = 0, i = a.length;; ++h) {
var k;
if (i > h) {
if (k = a[h], null == k.style) {
a.push(k);
continue
}
} else {
if (!e) break;
k = new b("", null)
}
var l = k.token;
if (null == e)
if (R == k.style) "<" == f.decode(l, 0) && (f.decode(l, f.next), ("%" == f.ch || "?" == f.ch) && (e = f.ch, d.push(new b(l.substring(0, f.next), P)), l = l.substring(f.next, l.length)));
else if (P == k.style && "<" == f.decode(l, 0) && "/" != l.charAt(f.next)) {
var m = l.substring(f.next).toLowerCase();
(j(m, "script") || j(m, "style") || j(m, "xmp")) && (e = "/")
}
if (null != e) {
if (m = null, R == k.style ? (("%" == e || "?" == e) && (k = l.lastIndexOf(e), k >= 0 && ">" == f.decode(l, k + 1) && l.length == f.next && (m = new b(l.substring(k, l.length), P), l = l.substring(0, k))), null == g && (g = []), g.push(new b(l, O))) : O == k.style ? (null == g && (g = []), g.push(k)) : P == k.style ? "<" == f.decode(k.token, 0) && k.token.length > f.next && "/" == f.decode(k.token, f.next) ? m = k : d.push(k) : h >= i ? m = k : g ? g.push(k) : d.push(k), m) {
if (g) {
for (e = C(g), d.push(new b("<span class=embsrc>", null)), g = 0, l = e.length; l > g; ++g) d.push(e[g]);
                        d.push(new b("</span>", null)), g = null
}
m.token && d.push(m), e = null
}
} else d.push(k)
}
return d
}

function A(a) {
for (var d = null, e = null, f = 0; f < a.length; ++f)
if (O == a[f].style) {
d = f;
break
}
for (f = a.length; --f >= 0;)
if (O == a[f].style) {
e = f;
break
}
if (null == d) return a;
f = new c;
var g = a[d].token,
h = f.decode(g, 0);
if ('"' != h && "'" != h) return a;
var i = f.next,
j = a[e].token,
k = j.lastIndexOf("&");
0 > k && (k = j.length - 1);
var l = f.decode(j, k);
for ((l != h || f.next != j.length) && (l = null, k = j.length), h = [], f = 0; d > f; ++f) h.push(a[f]);
if (h.push(new b(g.substring(0, i), T)), e == d) h.push(new b(g.substring(i, k), O));
else {
for (h.push(new b(g.substring(i, g.length), O)), f = d + 1; e > f; ++f) h.push(a[f]);
l ? a.push(new b(j.substring(0, k), O)) : a.push(a[e])
}
for (l && h.push(new b(j.substring(k, j.length), O)), f = e + 1; f < a.length; ++f) h.push(a[f]);
return h
}

function B(a) {
for (var c = [], d = null, e = !1, f = "", g = 0, h = a.length; h > g; ++g) {
var i = a[g],
k = c;
if (P == i.style)
if (e) {
if (e = !1, f = "", d) {
c.push(new b("<span class=embsrc>", null)), d = C(A(d));
                        for (var l = 0, m = d.length; m > l; ++l) c.push(d[l]);
                        c.push(new b("</span>", null)), d = null
}
} else f && i.token.indexOf("=") >= 0 ? (l = f.toLowerCase(), (j(l, "on") || "style" == l) && (e = !0)) : f = "";
else S == i.style ? f += i.token : T == i.style ? e && (null == d && (d = []), k = d, i = new b(i.token, O)) : d && (k = d);
k.push(i)
}
return c
}

function C(a) {
a = v(a);
for (var b = [], c = 0; c < a.length; ++c) {
var d = a[c];
O === d.style ? w(d.token, b) : b.push(d)
}
return b
}

function D(a) {
return a = x(a), a = y(a), a = z(a), a = B(a)
}

function E(a) {
a = r(s(a), U);
for (var b = !1, c = 0; c < a.length; ++c)
if (O == a[c].style) {
if (j(i(a[c].token), "&lt;"))
for (c = a.length; --c >= 0;)
if (O == a[c].style) {
b = k(i(a[c].token), "&gt;");
break
}
break
}
return b ? D(a) : C(a)
}

function F(a) {
try {
for (var b = E(a), c = [], d = null, e = 0; e < b.length; e++) {
var f = b[e];
f.style != d && (null != d && c.push("</span>"), null != f.style && c.push("<span class=", f.style, ">"), d = f.style);
                var g = f.token;
                null != f.style && (g = g.replace(/(\r\n?|\n| ) /g, "$1&nbsp;").replace(/\r\n?|\n/g, "<br>")), c.push(g)
            }
            return null != d && c.push("</span>"), c.join("")
} catch (h) {
return "console" in window && (console.log(h), console.trace()), a
}
}

function G(a) {
function b() {
for (var c = (new Date).getTime() + 250; f < a.length && (new Date).getTime() < c; f++) {
for (var d = a[f], e = !1, g = d.parentNode; null != g; g = g.parentNode) {
e = !0;
break
}
if (!e)
if (e = p(d), e = e.replace(/(?:\r\n?|\n)$/, ""), e = F(e), o(d)) {
g = document.createElement("PRE");
for (var h = 0; h < d.attributes.length; ++h) {
var i = d.attributes[h];
i.specified && g.setAttribute(i.name, i.value)
}
g.innerHTML = e, d.parentNode.replaceChild(g, d)
} else d.innerHTML = e
}
f < a.length && setTimeout(b, 250)
}
var c = [];
if (a = a || [], 0 == a.length) {
c = [document.getElementsByTagName("pre"), document.getElementsByTagName("code"), document.getElementsByTagName("xmp")];
for (var d = 0; d < c.length; ++d)
for (var e = 0; e < c[d].length; ++e) a.push(c[d][e]);
c = null
}
var f = 0;
b()
}
var H = {};
! function () {
for (var a = ["abstract bool break case catch char class const const_cast continue default delete deprecated dllexport dllimport do double dynamic_cast else enum explicit extern false float for friend goto if inline int long mutable naked namespace new noinline noreturn nothrow novtable operator private property protected public register reinterpret_cast return selectany short signed sizeof static static_cast struct switch template this thread throw true try typedef typeid typename union unsigned using declaration, directive uuid virtual void volatile while typeof", "as base by byte checked decimal delegate descending event finally fixed foreach from group implicit in interface internal into is lock null object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var", "package synchronized boolean implements import throws instanceof transient extends final strictfp native super", "debugger export function with NaN Infinity", "require sub unless until use elsif BEGIN END", "and assert def del elif except exec global lambda not or pass print raise yield False True None", "then end begin rescue ensure module when undef next redo retry alias defined", "done fi"], b = 0; b < a.length; b++)
for (var c = a[b].split(" "), d = 0; d < c.length; d++) c[d] && (H[c[d]] = !0)
}.call(this);
var I = "str",
J = "kwd",
K = "com",
L = "typ",
M = "lit",
N = "pun",
O = "pln",
P = "tag",
Q = "dec",
R = "src",
S = "atn",
T = "atv",
U = 2;
a.prototype.toString = function () {
return "[PR_TokenEnd " + this.end + (this.style ? ":" + this.style : "") + "]"
}, b.prototype.toString = function () {
return "[PR_Token " + this.token + (this.style ? ":" + this.style : "") + "]"
};
var V = {
lt: "<",
gt: ">",
quot: '"',
apos: "'",
amp: "&"
};
c.prototype.decode = function (a, b) {
var c = b + 1,
d = a.charAt(b);
if ("&" === d) {
var e = a.indexOf(";", c);
if (e >= 0 && c + 4 > e) {
if (c = a.substring(c, e), d = null, "#" === c.charAt(0)) {
var f = c.charAt(1);
f = "x" === f || "X" === f ? parseInt(c.substring(2), 16) : parseInt(c.substring(1), 10), isNaN(f) || (d = String.fromCharCode(f))
}
d || (d = V[c.toLowerCase()]), d ? (d = d, c = e + 1) : (c = b + 1, d = "\0")
}
}
return this.next = c, this.ch = d
};
var W = null;
window.prettyPrint = G
}();
var store = function () {
"use strict";
var a, b, c = !1;
return hasStore("sessionStorage") || (c = !0, a = function () {
var a = window.top.name ? JSON.parse(window.top.name) : {};
return {
clear: function () {
a = {}, window.top.name = ""
},
getItem: function (b) {
return a[b] || null
},
removeItem: function (b) {
delete a[b], window.top.name = JSON.stringify(a)
},
setItem: function (b, c) {
a[b] = c, window.top.name = JSON.stringify(a)
}
}
}()), hasStore("localStorage") ? hasStore("localStorage") && (b = window.localStorage) : b = $.extend({}, a), {
polyfill: c,
sessionStorage: a,
localStorage: b
}
}();
store.backup = {}, store.polyfill === !0 && (window.sessionStorage = store.sessionStorage, window.localStorage = store.localStorage);
try {
console.log("init")
} catch (e) {
var console = {
log: function () {}
}
}
jQuery.expr[":"].host = function (a, b, c) {
return a.host == c[3]
}, window.jsbin || (window.jsbin = {});
var storedSettings = localStorage.getItem("settings");
"undefined" === storedSettings && (storedSettings = null), window.jsbin.settings = $.extend(JSON.parse(storedSettings || "{}"), jsbin.settings), jsbin.mobile = /WebKit.*Mobile.*|Android/.test(navigator.userAgent), jsbin.tablet = /iPad/i.test(navigator.userAgent), jsbin.ie = function () {
for (var a, b = 3, c = document.createElement("div"), d = c.getElementsByTagName("i"); c.innerHTML = "<!--[if gt IE " + ++b + "]><i></i><![endif]-->", d[0];);
return b > 4 ? b : a
}(), storedSettings || location.origin + location.pathname !== jsbin.root + "/" || (localStorage.setItem("settings", "{}"), window.location = jsbin.root + "/welcome/edit?html,live" + (-1 !== location.search.indexOf("api=") ? ",&" + location.search.substring(1) : "")), jsbin.settings.editor || (jsbin.settings.editor = {}), jsbin.settings.codemirror && $.extend(jsbin.settings.editor, jsbin.settings.codemirror), jsbin.settings.editor.theme && $(document.documentElement).addClass("cm-s-" + jsbin.settings.editor.theme), jQuery.ajaxPrefilter(function (a, b, c) {
var d = {
head: 1,
get: 1
};
d[a.type.toLowerCase()] || c.setRequestHeader("X-CSRF-Token", jsbin.state.token)
}), jsbin.getURL = function (a) {
var b = a ? "" : jsbin.root,
c = jsbin.state;
return c.code && (b += "/" + c.code, c.revision && (b += "/" + c.revision)), b
};
var $body = $("body"),
$document = $(document),
debug = void 0 === jsbin.settings.debug ? !1 : jsbin.settings.debug,
documentTitle = "JS Bin",
$bin = $("#bin"),
loadGist, $document = $(document),
unload = function () {
if (jsbin.panels.focused.editor) try {
sessionStorage.setItem("line", jsbin.panels.focused.editor.getCursor().line), sessionStorage.setItem("character", jsbin.panels.focused.editor.getCursor().ch)
} catch (a) {
sessionStorage.setItem("line", 0), sessionStorage.setItem("character", 0)
}
sessionStorage.setItem("url", jsbin.getURL()), localStorage.setItem("settings", JSON.stringify(jsbin.settings)), jsbin.panels.save(), jsbin.panels.savecontent();
var b = jsbin.panels.focused;
b && sessionStorage.setItem("panel", b.id)
};
$(window).unload(unload), $.browser.opera && setInterval(unload, 500), -1 !== location.search.indexOf("api=") && function () {
for (var a = location.search.substring(1).split(","), b = [], c = a.length, d = ""; c--;) - 1 !== a[c].indexOf("api=") ? d = a[c].replace(/&?api=/, "") : b.push(a[c]);
$.getScript(jsbin.root + "/js/chrome/sandbox.js", function () {
var a = new Sandbox(d);
a.get("settings", function (a) {
$.extend(jsbin.settings, a), unload(), window.location = location.pathname + (b.length ? "?" + b.join(",") : "")
})
})
}(), $document.one("jsbinReady", function () {
$bin.removeAttr("style"), $body.addClass("ready")
}), -1 !== navigator.userAgent.indexOf(" Mac ") && function () {
var a = $("#keyboardHelp")[0];
a.innerHTML = a.innerHTML.replace(/ctrl/g, "cmd").replace(/Ctrl/g, "ctrl")
}(), jsbin.embed && $(window).on("focus", function () {
return !1
});
var noop = function () {}, rootClassName = document.body.className;
if (jsbin.mobile || jsbin.tablet || -1 !== rootClassName.indexOf("ie6") || -1 !== rootClassName.indexOf("ie7")) {
$("body").addClass("mobile"), jsbin.lameEditor = !0, Editor = function (a, b) {
this.textarea = a, this.win = {
document: this.textarea
}, this.ready = !0, this.wrapping = document.createElement("div");
var c = this.textarea.parentNode;
this.wrapping.appendChild(this.textarea), c.appendChild(this.wrapping), this.textarea.style.opacity = 1, $(this.textarea).blur(throttle(function () {
$(document).trigger("codeChange", {
panelId: a.id
})
}, 200)), b.initCallback && $(b.initCallback)
}, Editor.prototype = {
getWrapperElement: function () {
return this.wrapping
},
getScrollerElement: function () {
return this.textarea
},
setOption: function (a, b) {
"onChange" == a && $(this.textarea).change(b)
},
setCode: function (a) {
this.textarea.value = a
},
getCode: function () {
return this.textarea.value
},
getValue: function () {
return this.textarea.value
},
setValue: function (a) {
this.textarea.value = a
},
focus: noop,
getCursor: function () {
return {
line: 0,
ch: 0
}
},
setCursor: noop,
currentLine: function () {
return 0
},
cursorPosition: function () {
return {
character: 0
}
},
nthLine: noop,
refresh: noop,
selectLines: noop,
on: noop
};
var _oldCM = CodeMirror;
CodeMirror = noop;
for (var key in _oldCM) CodeMirror[key] = noop;
CodeMirror.fromTextArea = function (a, b) {
return new Editor(a, b)
}, CodeMirror.keyMap = {
basic: {}
}
}
$.fn.splitter = function () {
var a = $(document),
b = $('<div class="block"></div>'),
c = $("body"),
d = JSON.parse(localStorage.getItem("splitterSettings") || "[]");
return this.each(function () {
function e(b) {
"y" === k && (b -= p);
var c = b - q[k].currentPos,
e = 100 / q[k].size * c,
f = (b - r[k]) * q[k].multiplier,
h = l[q[k].sizeProp](),
j = g[q[k].sizeProp]();
if ("y" === k && (e = 100 - e), 100 > h && 0 > f);
else if (100 > j && f > 0);
else {
g.css(q[k].cssProp, e + "%"), l.css(q[k].otherCssProp, 100 - e + "%");
var n = {};
n[q[k].cssProp] = e + "%", m.css(n), r[k] = b, d[i] = r, localStorage.setItem("splitterSettings", JSON.stringify(d)), setTimeout(function () {
a.trigger("sizeeditors")
}, 120)
}
}

function f() {
l = "x" === k ? m.prevAll(":visible:first") : m.nextAll(":visible:first")
}
var g = $(this),
h = $(this),
i = $.fn.splitter.guid++,
j = g.parent(),
k = "x",
l = "x" === k ? g.prevAll(":visible:first") : g.nextAll(":visible:first"),
m = $('<div class="resize"></div>'),
n = !1,
o = (j.width(), j.offset()),
p = (o.left, o.top),
q = {
x: {
currentPos: j.offset().left,
multiplier: 1,
cssProp: "left",
otherCssProp: "right",
size: j.width(),
sizeProp: "width",
moveProp: "pageX",
init: {
top: 0,
bottom: 0,
width: jsbin.mobile ? 44 : 8,
"margin-left": jsbin.mobile ? "-22px" : "-4px",
height: "100%",
left: "auto",
right: "auto",
opacity: 0,
position: "absolute",
cursor: "ew-resize",
"border-left": "1px solid rgba(218, 218, 218, 0.5)",
"z-index": 99999
}
},
y: {
currentPos: j.offset().top,
multiplier: -1,
size: j.height(),
cssProp: "bottom",
otherCssProp: "top",
sizeProp: "height",
moveProp: "pageY",
init: {
top: "auto",
cursor: "ns-resize",
bottom: "auto",
height: 8,
width: "100%",
left: 0,
right: 0,
opacity: 0,
position: "absolute",
border: 0,
"z-index": 99999
}
}
}, r = d[i] || {}, s = {
down: {
x: null,
y: null
},
delta: {
x: null,
y: null
},
track: !1,
timer: null
};
m.bind("mousedown", function (a) {
s.down.x = a.pageX, s.down.y = a.pageY, s.delta = {
x: null,
y: null
}, s.target = .25 * m["x" == k ? "height" : "width"]()
}), a.bind("mousemove", function (a) {
if (n) {
s.delta.x = s.down.x - a.pageX, s.delta.y = s.down.y - a.pageY, clearTimeout(s.timer), s.timer = setTimeout(function () {
s.down.x = a.pageX, s.down.y = a.pageY
}, 250);
var b = "x" == k ? "y" : "x";
Math.abs(s.delta[b]) > s.target && (m.trigger("change", b, a[q[b].moveProp]), s.down.x = a.pageX, s.down.y = a.pageY)
}
}), a.bind("mouseup touchend", function () {
n = !1, b.remove(), c.removeClass("dragging")
}).bind("mousemove touchmove", function (a) {
n && e(a[q[k].moveProp] || a.originalEvent.touches[0][q[k].moveProp])
}), b.bind("mousemove touchmove", function (a) {
n && e(a[q[k].moveProp] || a.originalEvent.touches[0][q[k].moveProp])
}), m.bind("mousedown touchstart", function (a) {
n = !0, c.append(b).addClass("dragging"), q[k].size = j[q[k].sizeProp](), q[k].currentPos = 0, f(), a.preventDefault()
}), m.bind("init", function (a, c) {
m.css(q[k].init), q[k].size = j[q[k].sizeProp](), f(), p = j.offset().top, b.css("cursor", "x" == k ? "ew-resize" : "ns-resize"), "y" == k ? (g.css("border-right", 0), l.css("border-left", 0), l.css("border-top", "2px solid #ccc")) : g.css("border-top", 0), g.is(":hidden") ? m.hide() : (l.length ? g.css("border-" + q[k].cssProp, "1px solid #ccc") : g.css("border-" + q[k].cssProp, "0"), e(void 0 !== c ? c : g.offset()[q[k].cssProp]))
}), m.bind("change", function (a, b, c) {
g.css(q[k].cssProp, "0"), l.css(q[k].otherCssProp, "0"), g.css("border-" + q[k].cssProp, "0"), "y" === b ? (g = g.find("> *"), m.appendTo(l), g.appendTo(l), l.css("height", "100%"), h.hide(), m.css("margin-left", 0), m.css("margin-top", 5), m.addClass("vertical"), delete r.x, h.nextAll(":visible:first").trigger("init")) : (g = l, l = d, g.appendTo(h), m.insertBefore(h), m.removeClass("vertical"), g.css("border-top", 0), g = h, h.show(), m.css("margin-top", 0), m.css("margin-left", -4), delete r.y, setTimeout(function () {
h.nextAll(":visible:first").trigger("init")
}, 0)), f(), k = b;
var d = g;
if (g = l, l = d, g.css(q[k].otherCssProp, "0"), l.css(q[k].cssProp, "0"), g.is(":visible")) {
if ("y" === k) {
var e = g.find(".resize");
e.each(function (a) {
var b = $(this);
this === m[0] || b.trigger("init", 100 / (e - a - 1))
})
}
m.trigger("init", c || g.offset()[q[k].cssProp] || q[k].size / 2)
}
}), l.css("width", "auto"), l.css("height", "auto"), g.data("splitter", m), g.before(m)
})
}, $.fn.splitter.guid = 0;
var analytics = {
libraryMenu: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/open-library-menu"])
},
embed: function () {
window._gaq && _gaq.push(["_trackPageview", "/embed/" + window.top.location.toString()])
},
revert: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/revert" + window.location.pathname])
},
milestone: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/milestone" + window.location.pathname])
},
clone: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/clone" + window.location.pathname])
},
lock: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/lock-revision"])
},
openShare: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/open-share"])
},
saveTemplate: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/save-template"])
},
createNew: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/new"])
},
startSaving: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/start-saving"])
},
open: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/open"])
},
openFromAvatar: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/open-from-avatar"])
},
download: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/download" + window.location.pathname])
},
showPanel: function (a) {
window._gaq && _gaq.push(["_trackPageview", "/action/panel/show/" + a])
},
hidePanel: function (a) {
window._gaq && _gaq.push(["_trackPageview", "/action/panel/hide/" + a])
},
logout: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/logout"])
},
login: function (a) {
window._gaq && (void 0 === a ? _gaq.push(["_trackPageview", "/action/login"]) : _gaq.push(["_trackPageview", "success"]))
},
help: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/help"])
},
urls: function () {
window._gaq && _gaq.push(["_trackPageview", "/action/urls"])
},
enableLiveJS: function (a) {
window._gaq && _gaq.push(["_trackPageview", "on"])
},
loadGist: function (a) {
window._gaq && _gaq.push(["_trackPageview", "/action/gist/" + a])
},
layout: function (a) {
var b = [],
c = "";
if (window._gaq) {
for (c in a) b.push(c + ":" + a[c]);
_gaq.push(["_trackPageview", "/action/layout/" + b.join("/")])
}
}
}, consoleTest = /(^.|\b)console\./,
iframedelay = function () {
var a, b = {
active: !1
}, c = document.createElement("iframe"),
d = "__callback" + +new Date;
c.style.height = c.style.width = "1px", c.style.visibility = "hidden", document.body.appendChild(c), a = c.contentDocument || c.contentWindow.document, window[d] = function (a) {
b.active = 0 === a;
try {
c.parentNode.removeChild(c), delete window[d]
} catch (e) {}
};
try {
a.open(), a.write("<script>window.parent." + d + "(window.innerWidth)</script>"), a.close()
} catch (e) {
b.active = !0
}
return b
}(),
re = null,
$live = $("#live"),
showlive = $("#showlive")[0],
throttledPreview = throttle(tryToRender, 200),
killAlerts = "<script>try{window.open=function(){};window.print=function(){};window.alert=function(){};window.prompt=function(){};window.confirm=function(){};}catch(e){}</script>",
restoreAlerts = "<script>try{delete window.print;delete window.alert;delete window.prompt;delete window.confirm;delete window.open;}catch(e){}</script>",
liveScrollTop = null,
iframedelay = function () {
var a, b = {
active: !1
}, c = document.createElement("iframe"),
d = "__callback" + +new Date;
c.style.height = c.style.width = "1px", c.style.visibility = "hidden", document.body.appendChild(c), a = c.contentDocument || c.contentWindow.document, window[d] = function (a) {
b.active = 0 === a;
try {
c.parentNode.removeChild(c), delete window[d]
} catch (e) {}
};
try {
a.open(), a.write("<script>window.parent." + d + "(window.innerWidth)</script>"), a.close()
} catch (e) {
b.active = !0
}
return b
}(),
getDoctype = function () {
var a = /<!doctype [\s\S]*?>/i;
return function (b) {
var c = (b.match(a) || [""])[0],
d = b.substr(c.length);
return {
doctype: c,
tail: d
}
}
}(),
deferredLiveRender = null;
$document.bind("codeChange.live", codeChangeLive);
var keyboardHelpVisible = !1,
customKeys = objectValue("jsbin.settings.keys") || {};
$("#enablealt").attr("checked", customKeys.useAlt ? !0 : !1).change(function () {
jsbin.settings.keys || (jsbin.settings.keys = {}), jsbin.settings.keys.useAlt = this.checked
}), customKeys.disabled || $body.keydown(keycontrol);
var panelShortcuts = {};
panelShortcuts.start = 48;
var ua = navigator.userAgent;
$.browser.platform = /macintosh|mac os x/.test(ua) ? "mac" : /windows|win32/.test(ua) ? "win" : /linux/.test(ua) ? "linux" : "", customKeys.disabled || $document.keydown(function (a) {
var b = customKeys.useAlt ? a.altKey : !a.altKey,
c = customKeys.closePanel ? customKeys.closePanel : 192;
a.ctrlKey && (a.metaKey = !0), a.metaKey && 79 == a.which ? ($(".homebtn").click(), a.preventDefault()) : a.metaKey && 83 == a.which ? 0 == a.shiftKey ? (saveChecksum ? saveChecksum = !1 : $("a.save:first").click(), a.preventDefault()) : 1 == a.shiftKey && ($(".clone").click(), a.preventDefault()) : a.which === c && a.metaKey && b && jsbin.panels.focused ? jsbin.panels.hide(jsbin.panels.focused.id) : 220 === a.which && (a.metaKey || a.ctrlKey) ? (jsbin.settings.hideheader = !jsbin.settings.hideheader, $body[jsbin.settings.hideheader ? "addClass" : "removeClass"]("hideheader")) : 76 === a.which && a.ctrlKey && jsbin.panels.panels.console.visible && (a.shiftKey ? jsconsole.reset() : jsconsole.clear())
});
var ignoreNextKey = !1,
jsconsole = function (a) {
function b(a, b) {
return a.toLowerCase() < b.toLowerCase() ? -1 : 1
}

function c(a) {
return String(a).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;")
}

function d(a, e, f) {
var g, h, i = "",
j = "",
k = [],
l = [],
m = !1;
f = f || [];
try {
j = {}.toString.call(a)
} catch (n) {
j = "[object Object]"
}
for (h = 0; h < f.length; h++)
if (a === f[h]) {
m = !0;
break
}
if (m) i = "[circular " + j.slice(1), a.outerHTML && (i += ":\n" + c(a.outerHTML));
else if ("[object String]" == j) i = '"' + c(a.replace(/"/g, '\\"')) + '"';
else if ("[object Array]" == j) {
for (f.push(a), i = "[", g = 0; g < a.length; g++) k.push(d(a[g], e, f));
i += k.join(", ") + "]"
} else if ("[object Object]" == j) {
f.push(a), i = "{";
for (g in a) l.push(g);
for (l.sort(b), g = 0; g < l.length; g++) k.push(d(l[g], void 0, f) + ": " + d(a[l[g]], e, f));
i += k.join(", ") + "}"
} else if ("[object Number]" == j) i = a + "";
else if ("[object Boolean]" == j) i = a ? "true" : "false";
else if ("[object Function]" == j) i = a.toString();
else if (null === a) i = "null";
else if (void 0 === a) i = "undefined";
else if (void 0 === e) {
f.push(a), i = j + "{\n";
for (g in a) l.push(g);
for (l.sort(b), g = 0; g < l.length; g++) try {
k.push(l[g] + ": " + d(a[l[g]], !0, f))
} catch (n) {
"NS_ERROR_NOT_IMPLEMENTED" == n.name
}
i += k.join(",\n") + "\n}"
} else {
f.push(a);
try {
i = d(a, !0, f) + ""
} catch (n) {}
}
return i
}

function e(a) {
return (a || "").replace(/[<&]/g, function (a) {
return {
"&": "&amp;",
"<": "&lt;"
}[a]
})
}

function f(a) {
var b = null,
c = "response",
f = k(a);
if (f) return ["info", f];
try {
b = H.contentWindow.eval(a)
} catch (g) {
b = g.message, c = "error"
}
return [c, e(d(b))]
}

function g(a, b, c) {
a = q(a), void 0 === b && (J.push(a), s(J)), (a.match(Q) || []).length > 1, i(a);
var d = document.createElement("div"),
e = document.createElement("li"),
g = document.createElement("span");
G.parentNode, k(a) || H && H.contentWindow || (H = $live.find("iframe")[0], H && H.contentWindow || (renderLivePreview(!1), H = $live.find("iframe")[0]), Z.setSandbox(H)), setTimeout(function () {
if (c = c || f(a), void 0 !== c && (d.className = "response", g.innerHTML = c[1], "info" != c[0] && prettyPrint([g]), d.appendChild(g), e.className = c[0], e.innerHTML = '<span class="gutter"></span>', e.appendChild(d), j(e), E.value = "", V)) try {
"console" === jsbin.panels.focused.id && (jsbin.embed || T.focus(), document.execCommand("selectAll", !1, null), document.execCommand("delete", !1, null))
} catch (b) {}
pos = J.length
}, 0)
}

function h(a, b) {
var c = document.createElement("li"),
d = document.createElement("div");
d.innerHTML = a, prettyPrint([d]), c.className = b || "log", c.innerHTML = '<span class="gutter"></span>', c.appendChild(d), j(c)
}

function i(a) {
var b = document.createElement("li");
b.className = "echo", b.innerHTML = '<span class="gutter"></span><div>' + e(a) + "</div>", O = null, j(b, !0)
}

function j(a, b) {
G.appendChild(a), G.parentNode.scrollTop = G.parentNode.scrollHeight + 1e3
}

function k(a) {
var b, c = [];
return ":" == a.substr(0, 1) ? (c = a.substr(1).split(" "), b = c.shift(), (R[b] || l).apply(this, c)) : void 0
}

function l() {}

function m() {
var a = [":reset - destroy state and start afresh", ":history - list current session history", ":load &lt;url&gt; - to inject new DOM", ":load &lt;script_url&gt; - to inject external library", "      load also supports following shortcuts: <br />      jquery, underscore, prototype, mootools, dojo, rightjs, coffeescript, yui.<br />      eg. :load jquery", ":clear - to clear contents of the console", ":about jsconsole"];
return a.join("\n")
}

function n(a) {
return navigator.onLine ? arguments.length > 1 || M[a] || -1 !== a.indexOf(".js") ? o.apply(this, arguments) : p(a) : "You need to be online to use :load"
}

function o() {
for (var b = H.contentDocument || H.contentWindow.document, c = 0; c < arguments.length; c++)! function (c) {
var d = document.createElement("script");
d.src = c, d.onload = function () {
a.top.info("Loaded " + c, "http://" + a.location.hostname), c == M.coffeescript && a.top.info("Now you can type CoffeeScript instead of plain old JS!")
}, d.onerror = function () {
h("Failed to load " + c, "error")
}, b.body.appendChild(d)
}(M[arguments[c]] || arguments[c]);
return "Loading script..."
}

function p(b) {
var c = H.contentWindow.document,
d = document.createElement("script"),
e = "loadDOM" + +new Date;
return d.src = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22" + encodeURIComponent(b) + "%22&format=xml&callback=" + e, a[e] = function (b) {
if (b.results.length) {
var d = b.results[0].replace(/type="text\/javascript"/gi, 'type="x"').replace(/<body.*?>/, "").replace(/<\/body>/, "");
c.body.innerHTML = d, a.top.info("DOM load complete")
} else h("Failed to load DOM", "error");
try {
a[e] = null, delete a[e]
} catch (f) {}
}, document.body.appendChild(d), "Loading url into DOM..."
}

function q(a) {
return (a || "").replace(/^\s+|\s+$/g, "")
}

function r() {
return 'Ported to JS Bin from <a target="_new" href="http://jsconsole.com">jsconsole.com</a>'
}

function s(a) {
if ("undefined" != typeof JSON) try {
sessionStorage.setItem("history", JSON.stringify(a))
} catch (b) {}
}

function t() {
var a = [""];
if ("undefined" == typeof JSON) return a;
try {
a = JSON.parse(sessionStorage.getItem("history") || '[""]')
} catch (b) {}
return a
}

function u() {
var a = t();
return a.shift(), a.join("\n")
}

function v(a) {
var b = {
38: 1,
40: 1,
Up: 38,
Down: 40,
Enter: 10,
"U+0009": 9,
"U+0008": 8,
"U+0190": 190,
Right: 39,
"U+0028": 57,
"U+0026": 55
};
return b[a.keyIdentifier] || a.which || a.keyCode
}

function w(a) {
if (a = V ? e(a) : a, E.value = a, V) document.execCommand("selectAll", !1, null), document.execCommand("delete", !1, null), document.execCommand("insertHTML", !1, a);
else {
var b = a.match(/\n/g);
E.setAttribute("rows", null !== b ? b.length + 1 : 1)
}
T.focus()
}

function x(a, b) {
for (var c = 0, d = 0; d < a.length; d++) {
if (a[d] == b) return c;
c += a[d].nodeValue.length
}
return -1
}

function y() {
var b = E.textContent;
b.length, B(), T.innerHTML = b, D = !1, document.getElementsByTagName("a")[0].focus(), T.focus();
var c, d;
document.createRange ? (c = document.createRange(), c.selectNodeContents(T), c.collapse(!1), d = a.getSelection(), d.removeAllRanges(), d.addRange(c)) : document.selection && (c = document.body.createTextRange(), c.moveToElementText(T), c.collapse(!1), c.select())
}

function z(a, b) {
var c = {}, d = [];
if (C[a])
if (b)
for (var e, f = 0; f < C[a].length, e = C[a][f]; f++) 0 === e.indexOf(b) && e != b && d.push(e.substr(b.length, e.length));
else d = C[a];
else {
try {
c.alert = H.contentWindow.alert, H.contentWindow.alert = function () {}, C[a] = H.contentWindow.eval("console.props(" + a + ")").sort(), delete H.contentWindow.alert
} catch (g) {
C[a] = []
}
"undefined" == C[a][0] && (ccOptions[a] = []), D = 0, d = C[a]
}
return d
}

function A(a) {
var b, c = T.textContent.split(/[;\s]+/g).pop(),
d = c.split("."),
e = v(a),
f = [];
if (c)
if ("." == c.substr(-1) ? (c = c.substr(0, c.length - 1), f = z(c)) : f = z(d.slice(0, d.length - 1).join(".") || "window", d[d.length - 1]), f.length) {
if (D = 9 == e ? 1 === f.length ? !1 : a.shiftKey ? 0 == D ? f.length - 1 : D - 1 : D == f.length - 1 ? 0 : D + 1 : 0, D === !1 ? y() : (T.nextSibling || (b = document.createElement("span"), b.className = "suggest", E.appendChild(b)), T.nextSibling.innerHTML = f[D], E.value = E.textContent), 9 == e) return !1
} else D = !1;
else D = !1;
D === !1 && T.nextSibling && B(), E.value = E.textContent
}

function B() {
V || E.setAttribute("rows", 1), V && T.nextSibling && T.parentNode.removeChild(T.nextSibling)
}
a.info = function (a) {
var b = document.createElement("li");
b.className = "info", b.innerHTML = '<span class="gutter"></span><div>' + e(a) + "</div>", j(b)
};
var C = {}, D = !1;
a._console = {
log: function () {
for (var b = arguments.length, c = 0; b > c; c++) h(d(arguments[c], !0));
a.console.log.apply(a.console, arguments)
},
dir: function () {
for (var b = arguments.length, c = 0; b > c; c++) h(d(arguments[c]));
a.console.dir.apply(a.console, arguments)
},
props: function (b) {
var c = [];
try {
for (var d in b) c.push(d)
} catch (e) {}
return a.console.props.apply(a.console, arguments), c
},
error: function (b) {
h(b.message, "error"), a.console.error.apply(a.console, arguments)
}
}, a._console.info = a._console.log;
var E = document.getElementById("exec"),
F = E.form || {}, G = null,
H = null,
I = null,
J = t(),
K = null,
L = "window.parent._console",
M = {
jquery: "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js",
prototype: "http://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js",
dojo: "http://ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.xd.js",
mootools: "http://ajax.googleapis.com/ajax/libs/mootools/1/mootools-yui-compressed.js",
underscore: "http://documentcloud.github.com/underscore/underscore-min.js",
rightjs: "http://rightjs.org/hotlink/right.js",
coffeescript: "http://jashkenas.github.com/coffee-script/extras/coffee-script.js",
yui: "http://yui.yahooapis.com/3.9.1/build/yui/yui-min.js"
}, N = document.getElementsByTagName("body")[0],
O = null,
P = !1,
Q = /:((?:help|about|load|clear|reset|wait|history)(?:.*))\n/gi,
R = {
history: u,
help: m,
about: r,
load: n,
wait: function () {
return P = !0, ""
},
clear: function () {
return setTimeout(function () {
G.innerHTML = ""
}, 10), "clearing..."
},
reset: function () {
return G.innerHTML = "", Z.init(G, !0), "Context reset"
}
}, S = null,
T = document.getElementById("cursor"),
U = -1 !== navigator.userAgent.indexOf("AppleWebKit") && -1 !== navigator.userAgent.indexOf("Mobile"),
V = -1 !== navigator.userAgent.indexOf("AppleWebKit") && -1 === navigator.userAgent.indexOf("Mobile") || -1 !== navigator.userAgent.indexOf("OS 5_");
if (V) {
var W = jsbin.embed ? "" : "autofocus";
E.parentNode.innerHTML = "<div " + W + ' id="exec" autocapitalize="off" spellcheck="false"><span id="cursor" spellcheck="false" autocapitalize="off" autocorrect="off"' + (U ? "" : " contenteditable") + "></span></div>", E = document.getElementById("exec"), T = document.getElementById("cursor")
} else $("#console").addClass("plain"); if (V && U && (S = document.createElement("input"), S.className = "fakeInput", S.setAttribute("spellcheck", "false"), S.setAttribute("autocorrect", "off"), S.setAttribute("autocapitalize", "off"), E.parentNode.appendChild(S)), E.ontouchstart = function () {
a.scrollTo(0, 0)
}, E.onkeyup = function (a) {
var b = v(a);
V && 9 != b && 16 != b && (clearTimeout(K), K = setTimeout(function () {
A(a)
}, 200))
}, V && (T.__onpaste = function () {
setTimeout(function () {
T.innerHTML = T.innerText
}, 10)
}), E.onkeydown = function (b) {
b = b || a.event;
var c = {
38: 1,
40: 1
}, d = "large" == N.className,
e = v(b);
if ("string" == typeof e && (e = e.replace(/\/U\+/, "\\u")), c[e]) {
if (b.shiftKey);
else if (!d) {
if (V && a.getSelection) {
a.selObj = a.getSelection(), selObj.getRangeAt(0), cursorPos = x(selObj.anchorNode.parentNode.childNodes, selObj.anchorNode) + selObj.anchorOffset;
var f = E.value,
h = f.indexOf("\n"),
i = f.lastIndexOf("\n");
if (-1 !== h) {
if (38 == e && cursorPos > h) return;
if (40 == e && i > cursorPos) return
}
}
if (38 == e ? (pos--, 0 > pos && (pos = 0)) : 40 == e && (pos++, pos >= J.length && (pos = J.length)), void 0 != J[pos] && "" !== J[pos]) return B(), w(J[pos]), !1;
if (pos == J.length) return B(), w(""), !1
}
} else if (13 != e && 10 != e || 0 != b.shiftKey)
if (13 != e && 10 != e || V || 1 != b.shiftKey)
if (9 == e && d) checkTab(b);
else if (b.shiftKey && b.metaKey && 8 == e) G.innerHTML = "";
else if (39 != e && 35 != e || D === !1) {
if (b.ctrlKey && 76 == e) G.innerHTML = "";
else if (V) {
if (D !== !1 && 9 == e) return A(b), !1;
D !== !1 && T.nextSibling && B()
}
} else y();
else {
var j = E.value.match(/\n/g);
j = null != j ? j.length + 2 : 2, E.setAttribute("rows", j)
} else if (B(), 1 == b.shiftKey || b.metaKey || b.ctrlKey || !d) {
var k = E.textContent || E.value;
return k.length && g(k), !1
}
}, V && U) {
S.onkeydown = function (a) {
B();
var b = v(a);
return 13 == b || 10 == b ? (g(this.value), this.value = "", T.innerHTML = "", !1) : void 0
}, S.onkeyup = function (a) {
T.innerHTML = e(this.value);
var b = v(a);
V && 9 != b && 16 != b && (clearTimeout(K), K = setTimeout(function () {
A(a)
}, 200))
};
var X = null,
Y = 0;
F.addEventListener("touchstart", function (a) {
return D !== !1 && (a.preventDefault(), clearTimeout(X), Y++, 2 === Y ? (y(), S.value = T.textContent, B(), S.focus()) : X = setTimeout(function () {
Y = 0, A({
which: 9
})
}, 200)), !1
})
}
F.onsubmit = function (b) {
return b = b || a.event, b.preventDefault && b.preventDefault(), B(), g(E.textContent || E.value), !1
}, document.onkeydown = function (b) {
b = b || a.event;
var c = b.which || b.keyCode;
b.shiftKey && b.metaKey && 8 == c ? (G.innerHTML = "", T.focus()) : b.target == G.parentNode && 32 == c && (G.parentNode.scrollTop += 5 + G.parentNode.offsetHeight * (b.shiftKey ? -1 : 1))
}, E.onclick = function () {
T.focus()
};
var Z = {
run: g,
clear: R.clear,
reset: function () {
this.run(":reset")
},
focus: function () {
V ? T.focus() : $(E).focus()
},
echo: i,
setSandbox: function (a) {
H = a, I = H.contentDocument || H.contentWindow.document, H.contentWindow.eval("(function () { var fakeConsole = " + L + "; if (window.console != undefined) { for (var k in fakeConsole) { console[k] = fakeConsole[k]; } } else { console = fakeConsole; } })();"), this.sandboxframe = H, "complete" !== I.readyState ? this.ready = !1 : Z.onload(), I.onreadystatechange = function () {
"complete" === I.readyState && (Z.ready = !0, Z.onload())
}, z("window")
},
_onloadQueue: [],
onload: function (a) {
var b = 0,
c = this._onloadQueue.length;
if (this.ready === !1 && a) this._onloadQueue.push(a);
else if (this.ready !== !0 || a) a && a.call(this);
else {
for (; c > b; b++) this._onloadQueue[b].call(this);
this._onloadQueue = []
}
},
init: function (a, b) {
G = a, H = $live.find("iframe")[0], H && this.setSandbox(H), void 0 === b && g(":help", !0)
},
rawMessage: function (b) {
b.type && "error" == b.type ? g(b.cmd, !0, ["error", b.response]) : b.type && "info" == b.type ? a.top.info(b.response) : (-1 === b.cmd.indexOf("console.log") && (b.response = b.response.substr(1, b.response.length - 2)), i(b.cmd), h(b.response, "response"))
},
stringify: d
};
return Z
}(this),
msgType = "";
jsconsole.init(document.getElementById("output")), jsconsole.queue = [], jsconsole.remote = {
log: function () {
var a = "console.log";
try {
throw new Error
} catch (b) {}
jsconsole.stringify(1 == arguments.length ? arguments[0] : [].slice.call(arguments, 0));
var c = [];
[].forEach.call(arguments, function (a) {
c.push(jsconsole.stringify(a, !0))
});
var d = {
response: c,
cmd: a,
type: msgType
};
jsconsole.ready ? jsconsole.rawMessage(d) : jsconsole.queue.push(d), msgType = ""
},
info: function () {
msgType = "info", remote.log.apply(this, arguments)
},
echo: function () {
var a = [].slice.call(arguments, 0),
b = a.pop(),
c = a.pop(),
d = a,
e = jsconsole.stringify(d, b),
f = {
response: e,
cmd: c
};
jsconsole.ready ? jsconsole.rawMessage(f) : jsconsole.queue.push(f)
},
error: function (a, b) {
var c = {
response: a.message,
cmd: b,
type: "error"
};
jsconsole.ready ? jsconsole.rawMessage(c) : jsconsole.queue.push(c)
},
flush: function () {
for (var a = 0; a < jsconsole.queue.length; a++) jsconsole.rawMessage(jsconsole.queue[a])
}
}, jsconsole.remote.debug = jsconsole.remote.dir = jsconsole.remote.log, jsconsole.remote.warn = jsconsole.remote.info;
var jshint = function () {
var a = editors.javascript.editor.getCode(),
b = JSHINT(a);
return b ? !0 : JSHINT.data()
}, jshintEnabled = !0,
detailsSupport = "open" in document.createElement("details"),
html = $.browser.msie && $.browser.version < 9 ? '<div class="details"><div class="summary">warnings</div>' : '<details><summary class="summary">warnings</summary></details>',
$error = $(html).appendTo(".panel.javascript").hide();
$error.find(".summary").click(function () {
detailsSupport || ($(this).nextAll().toggle(), $error[0].open = !$error[0].open), setTimeout(function () {
$document.trigger("sizeeditors")
}, 10)
}), detailsSupport || ($error[0].open = !1), JSHINT._data = JSHINT.data, JSHINT.data = function (a) {
var b = JSHINT._data(),
c = [];
if (a && b.errors) {
for (var d = 0; d < b.errors.length; d++) null !== b.errors[d] && b.errors[d].evidence ? c.push(b.errors[d]) : null !== b.errors[d] && 0 === b.errors[d].reason.indexOf("Stopping") && c.push("Fatal errors, unable to continue");
return {
errors: c
}
}
return b.errors = [], b
}, $error.delegate("li", "click", function () {
var a = JSHINT.data(!0).errors;
if (a.length) {
var b = $error.find("li").index(this);
return a[b].reason && (editors.javascript.editor.setSelection({
line: a[b].line - 1,
ch: 0
}, {
line: a[b].line - 1
}), editors.javascript.editor.focus()), !1
}
});
var checkForErrors = function () {
if (editors.javascript.visible && jshintEnabled) {
var a = jshint(),
b = JSHINT.data(!0),
c = "",
d = $error.is(":visible");
if (a === !0 && d) $error.hide(), $document.trigger("sizeeditors");
else if (b.errors.length) {
for (var e = ["<ol>"], c = b.errors, f = 0; f < c.length; f++) "string" == typeof c[f] ? e.push(escapeHTML(c[f])) : e.push("Line " + c[f].line + ": " + escapeHTML(c[f].evidence) + " --- " + escapeHTML(c[f].reason));
    e = e.join("<li>") + "</ol>", $error.find(".summary").text(1 == b.errors.length ? "1 warning" : b.errors.length + " warnings"), $error.find("ol").remove(), detailsSupport || 0 != $error[0].open || (e = $(e).hide()), $error.append(e).show(), $document.trigger("sizeeditors")
}
}
};
(jsbin.settings.jshint === !0 || void 0 === jsbin.settings.jshint) && ($(document).bind("codeChange", throttle(checkForErrors, 1e3)), $(document).bind("jsbinReady", checkForErrors));
var Processor = function (a, b, c) {
var d = !1,
e = function () {
return window.console && window.console.warn("Processor is not ready yet - trying again"), d = !0, ""
};
"undefined" == typeof c && (c = b, b = null);
var f = document.createElement("script");
f.src = a;
var g = function () {
b && b(), e = c, d && editors.console.render()
};
return f.onreadystatechange = f.onload = function () {
var a = f.readyState;
g.done || a && !/loaded|complete/.test(a) || (g.done = !0, g(), f.parentNode.removeChild(f))
}, document.body.appendChild(f),
function () {
return e.apply(this, arguments)
}
}, processors = jsbin.processors = {
coffeescript: function (a) {
return new Processor(jsbin.static + "/js/vendor/coffee-script.js", function () {
$.getScript(jsbin.static + "/js/vendor/codemirror3/mode/coffeescript/coffeescript.js", a)
}, function (a) {
var b = "";
try {
b = CoffeeScript.compile(a, {
bare: !0
})
} catch (c) {
console && console.error(c.message)
}
return b
})
},
typescript: function (a) {
return new Processor(jsbin.static + "/js/vendor/typescript.min.js", a, function (a) {
var b = function () {}, c = {
source: "",
Write: function (a) {
this.source += a
},
WriteLine: function (a) {
this.source += a + "\n"
},
Close: b
}, d = {
Write: b,
WriteLine: b,
Close: b
}, e = [],
f = new TypeScript.TypeScriptCompiler(c, d);
f.setErrorCallback(function (a, b, c) {
e.push({
start: a,
len: b,
message: c
})
}), f.parser.errorRecovery = !0, f.addUnit(a, "jsbin.ts"), f.typeCheck(), f.reTypeCheck(), f.emit();
for (var g = 0, h = e.length; h > g; g++) console.log("Error Message: " + e[g].message), console.log("Error Start: " + e[g].start), console.log("Error Length: " + e[g].len);
return c.source
})
},
markdown: function (a) {
return new Processor(jsbin.static + "/js/vendor/markdown.js", function () {
$.getScript(jsbin.static + "/js/vendor/codemirror3/mode/markdown/markdown.js", a)
}, function (a) {
return markdown.toHTML(a)
})
},
processing: function (a) {
return new Processor(jsbin.static + "/js/vendor/processing.min.js", function () {
$("#library").val($("#library").find(':contains("Processing")').val()).trigger("change"), $.getScript(jsbin.static + "/js/vendor/codemirror3/mode/clike/clike.js", a)
}, function (a) {
return a = ["(function(){", '  var canvas = document.querySelector("canvas");', "  if (!canvas) {", '    canvas = document.createElement("canvas");', "    (document.body || document.documentElement).appendChild(canvas);", "  }", "  canvas.width = window.innerWidth;", "  canvas.height = window.innerHeight;", "  var sketchProc = " + Processing.compile(a).sourceCode + ";", "  var p = new Processing(canvas, sketchProc);", "})();"].join("\n")
})
},
jade: function (a) {
return new Processor(jsbin.static + "/js/vendor/jade.js", function () {
window.jade = require("jade"), a()
}, function (a) {
return jade.compile(a, {
pretty: !0
})()
})
},
less: function (a) {
return new Processor(jsbin.static + "/js/vendor/less-1.3.0.min.js", function () {
$.getScript(jsbin.static + "/js/vendor/codemirror3/mode/less/less.js", a)
}, function (a) {
var b = "";
return less.Parser().parse(a, function (c, d) {
return c ? (console && console.error(c), a) : (b = $.trim(d.toCSS()), void 0)
}), b
})
},
stylus: function (a) {
return new Processor(jsbin.static + "/js/vendor/stylus.js", a, function (a) {
var b = "";
return stylus(a).render(function (a, c) {
return a ? (console && console.error(a), void 0) : (b = $.trim(c), void 0)
}), b
})
},
traceur: function (a) {
var b, c, d, e, f;
return new Processor(jsbin.static + "/js/vendor/traceur.js", function () {
$("#library").val($("#library").find(':contains("Traceur")').val()).trigger("change"), b = traceur.outputgeneration.SourceMapConsumer, c = traceur.outputgeneration.SourceMapGenerator, d = traceur.outputgeneration.ProjectWriter, e = traceur.util.ErrorReporter, a()
}, function (a) {
f = !1;
var b = new e;
b.reportMessageInternal = function (a, b, c, d) {
window.console.error(e.format(a, c, d))
};
var c = location.href,
g = new traceur.semantics.symbols.Project(c),
h = "jsbin",
i = new traceur.syntax.SourceFile(h, a);
g.addFile(i);
var j = traceur.codegeneration.Compiler.compile(b, g, !1),
k = "/*\nIf you've just translated to JS, make sure traceur is in the HTML panel.\nThis is terrible, sorry, but the only way we could get around race conditions. Eat me.\nHugs & kisses,\nDave xox\n*/\ntry{window.traceur = top.traceur;}catch(e){}\n";
return k + d.write(j)
})
}
}, render = function () {
jsbin.panels.ready && editors.console.render()
}, $processorSelectors = $("div.processorSelector").each(function () {
var a = this.getAttribute("data-type"),
b = $(this),
c = b.closest(".label").find("strong a"),
d = c.text();
b.find("a").click(function (b) {
var e = jsbin.panels.panels[a];
b.preventDefault();
var f = this.hash.substring(1),
g = $(this).text();
"convert" !== f ? (c.text(g), f === a ? (jsbin.processors.reset(a), render()) : jsbin.processors.set(a, f, render)) : (c.text(d), e.setCode(e.render()), jsbin.processors.reset(a))
}).bind("select", function (a, b) {
b === this.hash.substring(1) && c.text($(this).text())
})
});
processors.set = function (a, b, c) {
var d = jsbin.panels.panels[a];
a instanceof Panel && (d = a, a = d.id), jsbin.state.processors || (jsbin.state.processors = {});
var e = b ? editorModes[b] || editorModes[a] : editorModes[a];
d && (d.trigger("processor", b || "none"), b && processors[b] ? (jsbin.state.processors[a] = b, d.processor = processors[b](function () {
d.editor.setOption("mode", e), $processorSelectors.find("a").trigger("select", [b]), c && c()
})) : (d.editor.setOption("mode", e), d.processor = function (a) {
return a
}, delete jsbin.state.processors[a], delete d.type))
}, processors.reset = function (a) {
processors.set(a)
};
var $startingpoint = $("#startingpoint").click(function (a) {
return a.preventDefault(), localStorage && (analytics.saveTemplate(), localStorage.setItem("saved-javascript", editors.javascript.getCode()), localStorage.setItem("saved-html", editors.html.getCode()), $startingpoint.addClass("saved"), $("#tip p").html("Default starting point now changed to current code"), $html.addClass("showtip")), !1
});
$("a.disabled").on("click mousedown mouseup", function (a) {
return a.stopImmediatePropagation(), !1
}), $("#loginbtn").click(function () {
analytics.login(), $username.focus()
}), $(".logout").click(function (a) {
a.preventDefault(), $(this.hash).submit()
}), $(".homebtn").click(function () {
return "avatar" === this.id ? analytics.openFromAvatar() : analytics.open(), jsbin.panels.hideAll(), !1
});
var $lockrevision = $(".lockrevision").click(function (a) {
a.preventDefault(), analytics.lock(), $lockrevision.addClass("disabled").attr("disabled", !0), saveChecksum = !1
});
$document.on("saved", function () {
$lockrevision.val(function (a, b) {
return b.replace(/#\d+$/, "#" + jsbin.state.revision)
})
}), $("#sharemenu").bind("open", function () {
analytics.openShare(), $lockrevision.removeClass("disabled").removeAttr("disabled")
});
var dropdownOpen = !1,
onhover = !1,
menuDown = !1,
dropdownButtons = $(".button-dropdown, .button-open").mousedown(function (a) {
return $dropdownLinks.removeClass("hover"), dropdownOpen && dropdownOpen !== this && closedropdown(), dropdownOpen || (menuDown = !0, opendropdown(this)), a.preventDefault(), !1
}).mouseup(function () {
return menuDown ? !1 : void 0
}).click(function () {
return menuDown || closedropdown(), menuDown = !1, !1
});
$("#actionmenu").click(function () {
dropdownOpen = !0
});
var ignoreUp = !1;
$body.bind("mousedown", function (a) {
dropdownOpen && $(a.target).closest(".menu").length && (ignoreUp = !0)
}).bind("click mouseup", function (a) {
return !dropdownOpen || ignoreUp || $(a.target).closest(".menu").length ? (ignoreUp = !1, void 0) : (closedropdown(), !1)
});
var fromClick = !1,
$dropdownLinks = $(".dropdownmenu a").mouseup(function () {
setTimeout(closedropdown, 0), fromClick || (this.hostname === window.location.hostname ? $(this).triggerHandler("click") !== !1 && (window.location = this.href) : this.getAttribute("target") ? window.open(this.href) : window.location = this.href), fromClick = !1
}).mouseover(function () {
$dropdownLinks.removeClass("hover"), $(this).addClass("hover")
}).mousedown(function () {
fromClick = !0
});
$("#jsbinurl").click(function () {
setTimeout(function () {
jsbin.panels.panels.live.hide()
}, 0)
}), $("#runwithalerts").click(function () {
return editors.console.visible ? editors.console.render(!0) : renderLivePreview(!0), !1
}), $("#runconsole").click(function () {
return editors.console.render(), !1
}), $("#showhelp").click(function () {
return $body.toggleClass("keyboardHelp"), keyboardHelpVisible = $body.is(".keyboardHelp"), keyboardHelpVisible && analytics.help(), !1
}), $("#showurls").click(function () {
return $body.toggleClass("urlHelp"), urlHelpVisible = $body.is(".urlHelp"), urlHelpVisible && analytics.urls(), !1
}), $(".code.panel > .label > span.name").dblclick(function () {
jsbin.panels.allEditors(function (a) {
var b = !a.editor.getOption("lineNumbers");
a.editor.setOption("lineNumbers", b), jsbin.settings.editor.lineNumbers = b
})
}), $("#createnew").click(function () {
var a, b;
for (analytics.createNew(), jsbin.panels.savecontent = function () {}, a = 0; a < sessionStorage.length; a++) b = sessionStorage.key(a), 0 === b.indexOf("jsbin.content.") && sessionStorage.removeItem(b);
jsbin.panels.saveOnExit = !0, jsbin.panels.restore(), setTimeout(function () {
0 === jsbin.panels.getVisible().length && (jsbin.panels.panels.html.show(), jsbin.panels.panels.live.show())
}, 0)
}), $("form.login").closest(".menu").bind("close", function () {
$(this).find(".loginFeedback").empty().hide(), $("#login").removeClass("forgot")
}), $("#lostpass").click(function () {
return $("#login").addClass("forgot").find("input[name=email]").focus(), !1
}), jsbin.settings.includejs = void 0 === jsbin.settings.includejs ? !0 : jsbin.settings.includejs, $("#enablejs").change(function () {
jsbin.settings.includejs = this.checked, analytics.enableLiveJS(jsbin.settings.includejs), editors.live.render()
}).attr("checked", jsbin.settings.includejs), jsbin.settings.hideheader && $body.addClass("hideheader");
var cancelUp = !1;
$("form input, form textarea").focus(function () {
this.select(), cancelUp = !0
}).mouseup(function () {
return cancelUp ? (cancelUp = !1, !1) : void 0
}), window.location.hash && $('a[href$="' + window.location.hash + '"]').mousedown(),
function () {
var a = {
head: /<head(.*)\n/i,
meta: /<meta name="description".*?>/i,
metaContent: /content=".*?"/i
}, b = '<meta name="description" content="[add your bin description]" />\n';
$("#addmeta").click(function () {
var c = jsbin.panels.panels.html,
d = c.editor,
e = c.getCode();
a.meta.test(e) || (e = a.head.test(e) ? e.replace(a.head, "<head$1\n" + b) : b + e), c.setCode(e);
var f = d.getSearchCursor(a.meta);
f.findNext();
var g = d.getSearchCursor(a.metaContent);
g.findNext();
var h = {
line: f.pos.from.line,
ch: f.pos.from.ch + '<meta name="description" content="'.length
        }, i = {
                line: g.pos.to.line,
                ch: g.pos.to.ch - 1
            };
        d.setCursor(h), d.setSelection(h, i), d.on("cursoractivity", function () {
d.on("cursoractivity", null), j.clear()
});
var j = d.markText(h, i, {
className: "highlight"
});
return d.focus(), !1
})
}();
var $document = $(document),
$source = $("#source"),
editorModes = {
html: "htmlmixed",
javascript: "javascript",
css: "css",
typescript: "javascript",
markdown: "markdown",
coffeescript: "coffeescript",
less: "css",
processing: "text/x-csrc"
}, badChars = new RegExp("[​- ]", "g");
"default" === jsbin.settings.editor.tabMode ? CodeMirror.keyMap.basic.Tab = void 0 : "classic" !== jsbin.settings.editor.tabMode && (CodeMirror.keyMap.basic.Tab = "indentMore"), CodeMirror.commands || (CodeMirror.commands = {}), CodeMirror.commands.autocomplete = function (a) {
return CodeMirror.simpleHint(a, CodeMirror.javascriptHint)
};
var foldFunc = {
css: CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder),
javascript: CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder),
html: CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder)
}, vocab = emmet.require("resources").getVocabulary("system");
vocab.javascript = "javascript", emmet.require("resources").setVocabulary(vocab, "system");
var emmetToggleComment = emmet.require("actions").get("toggle_comment");
emmet.require("actions").add("toggle_comment", function (a) {
var b = emmet.require("editorUtils").outputInfo(a);
if ("javascript" != b.syntax) return emmetToggleComment.fn(a);
var c = emmet.require("editorUtils"),
d = a.getSelection(),
e = a.getCurrentLineRange(),
f = a.getCurrentLine(),
g = a.getCaretPos(),
h = emmet.require("htmlMatcher").tag(b.content, g);
return d.length || h && h.open.range.inside(g) ? emmetToggleComment.fn(a) : (0 == f.trim().indexOf("//") ? (a.setCaretPos(g), a.replaceContent(c.unindent(a, f.replace(/(\s*?)\/\/\s?/, "$1")), e.start, e.end, !1), a.setCaretPos(g - 3)) : (a.setCaretPos(g), a.replaceContent(c.unindent(a, "// " + f), e.start, e.end, !1), a.setCaretPos(g + 3)), void 0)
});
var Panel = function (a, b) {
var c = this,
d = !0,
e = null,
f = {}, g = {}, h = a;
c.settings = b = b || {}, c.id = c.name = a, e = $(".panel." + a), e.data("name", a), c.$el = e.detach(), c.$el.appendTo($source), c.$el.wrapAll('<div class="stretch panelwrapper">'), c.$panel = c.$el, c.$el = c.$el.parent().hide(), c.el = document.getElementById(a), c.order = ++Panel.order, c.$el.data("panel", c), this._eventHandlers = {}, panelShortcuts[panelShortcuts.start + c.order] = c.id, 1 === c.order && (b.nosplitter = !0), "javascript" === this.id && this.on("processor", function (a, b) {
"none" === b ? (jshintEnabled = !0, checkForErrors()) : (jshintEnabled = !1, $error.hide())
}), jsbin.state.processors && jsbin.state.processors[a] ? (h = jsbin.state.processors[a], jsbin.processors.set(c, jsbin.state.processors[a])) : b.processor ? (h = b.processors[b.processor], jsbin.processors.set(c, b.processor)) : c.processor = function (a) {
return a
}, b.editor && (g = {
parserfile: [],
readOnly: jsbin.state.embed ? "nocursor" : !1,
dragDrop: !1,
mode: editorModes[h],
lineWrapping: !0,
styleActiveLine: !0,
highlightSelectionMatches: !0,
theme: jsbin.settings.theme || "jsbin"
}, $.extend(g, jsbin.settings.editor || {}), g.extraKeys = {}, g.extraKeys["Ctrl-Q"] = function (b) {
foldFunc[a](b, b.getCursor().line)
}, "javascript" === a && (g.extraKeys.Tab = "autocomplete"), $.extend(g, {
syntax: a,
profile: a
}), c.editor = CodeMirror.fromTextArea(c.el, g), c.editor.on("change", function () {
return $document.trigger("codeChange", [{
panelId: c.id,
revert: !0
}]), !0
}), c.editor.on("gutterClick", foldFunc[a]), c.editor.on("focus", function () {
c.focus()
}), c._setupEditor(c.editor, a)), b.nosplitter ? c.splitter = $() : (c.splitter = c.$el.splitter(f).data("splitter"), c.splitter.hide()), b.beforeRender && $document.bind("render", $.proxy(b.beforeRender, c)), b.editor || (c.ready = !0), jsbin.state.embed, d && (this.controlButton = $('<a class="button group" href="?' + a + '">' + (b.label || a) + "</a>"), this.controlButton.click(function () {
return c.toggle(), !1
}), this.controlButton.appendTo("#panels")), e.focus(function () {
c.focus()
}), e.add(this.$el.find(".label")).click(function () {
c.focus()
})
};
Panel.order = 0, Panel.prototype = {
virgin: !0,
visible: !1,
show: function (a) {
var b = this,
c = b.$el.find(".panel").length;
if (analytics.showPanel(b.id), b.splitter.length) {
if (0 === c || c > 1) {
var d = $(".panel." + b.id).show();
d.closest(".panelwrapper").show()
} else b.$el.show();
b.splitter.show()
} else b.$el.show();
$body.addClass("panelsVisible"), b.settings.show && b.settings.show.call(b, !0), b.controlButton.addClass("active"), b.visible = !0, setTimeout(function () {
if (void 0 !== a ? b.splitter.trigger("init", a) : b.distribute(), b.editor) {
if (b.virgin) {
var c = b.$el.find(".label").outerHeight();
c += 8, $(b.editor.win).find(".CodeMirror-scroll .CodeMirror-lines").css("padding-top", c), populateEditor(b, b.name)
}(!b.virgin || jsbin.panels.ready) && (b.editor.focus(), b.focus()), b.virgin && b.settings.init && setTimeout(function () {
b.settings.init.call(b)
}, 10)
} else b.focus();
$document.trigger("sizeeditors"), b.trigger("show"), b.virgin = !1
}, 0)
},
hide: function () {
var a = this;
a.visible = !1, analytics.hidePanel(a.id);
var b = a.$el.find(".panel").length;
if (0 === b || b > 1) {
var c = $(".panel." + a.id).hide();
c.prev().hide(), 0 === c.closest(".panelwrapper").find(".panel:visible").length && c.closest(".panelwrapper").hide()
} else a.$el.hide(), a.splitter.hide();
a.editor && a.controlButton.toggleClass("hasContent", !! $.trim(this.getCode()).length), a.controlButton.removeClass("active"), a.distribute(), a.settings.hide && a.settings.hide.call(a, !0);
var d = jsbin.panels.getVisible();
d.length && (jsbin.panels.focused = d[0], jsbin.panels.focused.editor ? jsbin.panels.focused.editor.focus() : jsbin.panels.focused.$el.focus(), jsbin.panels.focused.focus()), $document.trigger("sizeeditors"), a.trigger("hide")
},
toggle: function () {
this[this.visible ? "hide" : "show"]()
},
getCode: function () {
return this.editor ? (badChars.lastIndex = 0, this.editor.getCode().replace(badChars, "")) : void 0
},
setCode: function (a) {
this.editor && (void 0 === a && (a = ""), this.controlButton.toggleClass("hasContent", !! a.trim().length), this.codeSet = !0, this.editor.setCode(a.replace(badChars, "")))
},
codeSet: !1,
blur: function () {
this.$panel.addClass("blur")
},
focus: function () {
this.$panel.removeClass("blur"), jsbin.panels.focus(this)
},
render: function () {
var a = this;
return a.editor ? a.processor(a.getCode()) : (this.visible && this.settings.render && jsbin.panels.ready && this.settings.render.apply(this, arguments), void 0)
},
init: function () {
this.settings.init && this.settings.init.call(this)
},
_setupEditor: function () {
var a = sessionStorage.getItem("panel"),
b = this,
c = b.editor;
c.setCode = function (a) {
try {
c.setValue(a)
} catch (b) {}
}, c.getCode = function () {
return c.getValue()
}, c.currentLine = function () {
var a = c.getCursor();
return a.line
}, (jsbin.mobile || jsbin.tablet || jsbin.embed) && (c._focus = c.focus, c.focus = function () {}), c.id = b.name, c.win = c.getWrapperElement(), c.scroller = $(c.getScrollerElement());
var d = b.$el.find(".label"); - 1 === document.body.className.indexOf("ie6") && d.length && c.on("scroll", function () {
var a = c.getScrollInfo();
a.top > 10 ? d.stop().animate({
opacity: 0
}, 20, function () {
$(this).hide()
}) : d.show().stop().animate({
opacity: 1
}, 150)
});
var e = null;
$document.bind("sizeeditors", function () {
if (b.visible) {
var a = b.editor.scroller.closest(".panel").outerHeight(),
d = 0;
"javascript" === b.name && (null === e && (e = b.$el.find("details")), d += e.filter(":visible").height() || 0), jsbin.lameEditor || c.scroller.height(a - d);
try {
c.refresh()
} catch (f) {}
}
}), setTimeout(function () {
b.ready = !0, populateEditor(b, b.name), a == b.name && setTimeout(function () {
if (b.focus(), b.visible && !jsbin.mobile && !jsbin.tablet) {
c.focus();
for (var a = c.getCode().split("\n"), d = null, e = 0; e < a.length; e++)
if (null === d && "" === a[e].trim()) {
d = e;
break
}
c.setCursor({
line: 1 * (sessionStorage.getItem("line") || d || 0),
ch: 1 * (sessionStorage.getItem("character") || 0)
})
}
}, 110)
}, 0)
},
populateEditor: function () {
populateEditor(this, this.name)
},
on: function (a, b) {
return (this._eventHandlers[a] = this._eventHandlers[a] || []).push(b), this
},
trigger: function (a) {
var b = [].slice.call(arguments, 1);
b.unshift({
type: a
});
for (var c = this._eventHandlers[a], d = 0; c && c[d];) c[d++].apply(this, b);
return this
}
};
var panels = {}, $window = $(window);
panels.getVisible = function () {
var a = this.panels,
b = [];
for (var c in a) a[c].visible && b.push(a[c]);
return b
}, panels.save = function () {
if (!jsbin.embed) {
for (var a, b = this.getVisible(), c = {}, d = "", e = $window.width(), f = 0; f < b.length; f++) a = b[f], d = a.$el.css("left"), -1 === d.indexOf("%") && (d = 100 * (parseFloat(d) / e) + "%"), c[a.name] = d;
sessionStorage.setItem("jsbin.panels", JSON.stringify(c))
}
}, panels.restore = function () {
var a = window.location,
b = a.search.substring(1),
c = a.hash.substring(1),
d = b || c ? (b || c).split(",") : jsbin.settings.panels || [],
e = jsbin.embed ? null : JSON.parse(sessionStorage.getItem("jsbin.panels") || "null"),
f = {
javascript: editors.javascript.getCode().length,
css: editors.css.getCode().length,
html: editors.html.getCode().length
}, g = "",
h = 0,
i = null,
j = [],
k = "",
l = !1,
m = $window.width(),
n = !! sessionStorage.getItem("panel");
if ((history.replaceState && -1 !== a.pathname.indexOf("/edit") || a.origin + a.pathname === jsbin.getURL() + "/") && history.replaceState(null, "", jsbin.getURL() + (jsbin.getURL() === jsbin.root ? "" : "/edit")), 0 === d.length && null === e && (f.javascript && d.push("javascript"), f.html && d.push("html"), f.css && d.push("css"), d.push("live")), panels.saveOnExit = a.pathname && "/" !== a.pathname ? !1 : !0, d.length) {
for (g in e) - 1 !== d.indexOf(g) && h++;
for (h === d.length && (l = !0), h = 0; h < d.length; h++) k = "", g = d[h], -1 !== g.indexOf("=") && (k = g.substring(g.indexOf("=") + 1), g = g.substring(0, g.indexOf("="))), panels.panels[g] ? (i = panels.panels[g], i.editor && k && i.setCode(decodeURIComponent(k)), l && d.length > 1 ? i.show(m * parseFloat(e[g]) / 100) : i.show(), j.push(i)) : g && k && function (a, b) {
var c = ["html", "javascript", "css"],
d = function (e, f) {
var g, h, i = panels.panels[f.panelId] || {};
if (f.panelId && i.editor && i.ready === !0) {
c.splice(c.indexOf(f.panelId), 1);
try {
g = i.getCode()
} catch (j) {} - 1 !== g.indexOf("%" + a + "%") && (h = g.split("%" + a + "%"), g = h[0] + decodeURIComponent(b) + h[1], i.setCode(g), $document.unbind("codeChange", d))
}
0 === c.length && $document.unbind("codeChange", d)
};
$document.bind("codeChange", d)
}(g, k);
1 === d.length && "preview" === d[0] && panels.panels.live.show(), l || this.distribute()
} else
for (g in e) panels.panels[g].show(m * parseFloat(e[g]) / 100);
for (h = 0; h < j.length; h++) j[h].init();
var o = panels.getVisible();
o.length && ($body.addClass("panelsVisible"), n || o[0].show())
}, panels.savecontent = function () {
var a, b;
for (a in this.panels) b = this.panels[a], b.editor && sessionStorage.setItem("jsbin.content." + a, b.getCode())
}, panels.focus = function (a) {
this.focused = a, a && $(".panel").removeClass("focus").filter("." + a.id).addClass("focus")
}, panels.distribute = function () {
var a, b = $("#source .panelwrapper:visible"),
c = 100,
d = 0,
e = $window.width() - (b.length - 1),
f = $("#source").outerHeight(),
g = 0,
h = 0,
i = 0,
j = [];
if (b.length) {
$body.addClass("panelsVisible"), c = 100 / b.length;
for (var k = 0; k < b.length; k++) a = $.data(b[k], "panel"), h = 100 - c * (k + 1), a.$el.css({
top: 0,
bottom: 0,
left: g + "%",
right: h + "%"
}), a.splitter.trigger("init", e * g / 100), a.splitter[0 == k ? "hide" : "show"](), g += c, j = $(b[k]).find(".panel"), j.length > 1 && (i = 0, j = j.filter(":visible"), d = 100 / j.length, j.each(function (a) {
bottom = 100 - d * (a + 1);
var b = jsbin.panels.panels[$.data(this, "name")];
$(this).css("top", i + "%"), $(this).css("bottom", bottom + "%"), b.splitter.hasClass("vertical") && (b.splitter.trigger("init", f * i / 100), b.splitter[0 == a ? "hide" : "show"]()), i += d
}))
} else $("#history").show(), setTimeout(function () {
$body.removeClass("panelsVisible")
}, 100)
}, panels.show = function (a) {
this.panels[a].show(), this.panels[a].editor && this.panels[a].editor.focus(), this.panels[a].focus()
}, panels.hide = function (a) {
var b = $("#history"),
c = this.panels;
c[a].visible && c[a].hide();
var d = jsbin.panels.getVisible();
d.length ? (jsbin.panels.focused = d[0], jsbin.panels.focused.editor ? jsbin.panels.focused.editor.focus() : jsbin.panels.focused.$el.focus(), jsbin.panels.focused.focus()) : b.length && !$body.hasClass("panelsVisible") ? ($body.toggleClass("dave", b.is(":visible")), b.toggle(100)) : 0 === b.length
}, panels.hideAll = function () {
for (var a = panels.getVisible(), b = a.length; b--;) a[b].hide()
}, Panel.prototype.distribute = function () {
panels.distribute()
}, jsbin.panels = panels;
var ignoreDuringLive = /^\s*(while|do|for)[\s*|$]/,
panelInit = {
html: function () {
var a = function () {
var a = this.editor.getValue().split("\n"),
b = -1;
a.forEach(function (a, c) {
-1 === b && 0 === a.trim().length && (b = c)
}), -1 !== b && (this.editor.setCursor({
line: b,
ch: 2
}), 0 === a[b].length && this.editor.indentLine(b, "add"))
};
return new Panel("html", {
editor: !0,
label: "HTML",
init: a
})
},
css: function () {
return new Panel("css", {
editor: !0,
label: "CSS"
})
},
javascript: function () {
return new Panel("javascript", {
editor: !0,
label: "JavaScript"
})
},
console: function () {
return new Panel("console", {
label: "Console"
})
},
live: function () {
function a() {
panels.ready && renderLivePreview()
}

function b() {
panels.panels.console.visible === !1
}
return new Panel("live", {
label: "Output",
show: a,
hide: b
})
}
}, editors = panels.panels = {};
editors.html = panelInit.html(), editors.css = panelInit.css(), editors.javascript = panelInit.javascript(), editors.console = panelInit.console(), upgradeConsolePanel(editors.console), editors.live = panelInit.live(), editors.live.settings.render = function (a) {
panels.ready && renderLivePreview(a)
}, panels.allEditors = function (a) {
var b, c;
for (b in panels.panels) c = panels.panels[b], c.editor && a(c)
}, setTimeout(function () {
panels.restore()
}, 10), panels.focus(panels.getVisible()[0] || null);
var editorsReady = setInterval(function () {
var a, b, c = !0,
d = null;
for (b in panels.panels) a = panels.panels[b], a.visible && !a.ready && (c = !1);
panels.ready = c, c && (clearInterval(editorsReady), panels.panels.console.visible ? editors.console.render() : renderLivePreview(), $(window).resize(function () {
clearTimeout(d), d = setTimeout(function () {
$document.trigger("sizeeditors")
}, 100)
}), $document.trigger("sizeeditors"), $document.trigger("jsbinReady"))
}, 100),
libraries = [{
url: "http://code.jquery.com/jquery-git.js",
label: "jQuery WIP (via git)",
group: "jQuery"
}, {
url: "http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js",
label: "jQuery 2.0.2",
group: "jQuery"
}, {
url: "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js",
label: "jQuery 1.latest",
group: "jQuery"
}, {
url: "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js",
label: "jQuery 1.10.1",
group: "jQuery"
}, {
url: "http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js",
label: "jQuery 1.8.3",
group: "jQuery"
}, {
url: ["http://code.jquery.com/ui/jquery-ui-git.css", "http://code.jquery.com/jquery-git.js", "http://code.jquery.com/ui/jquery-ui-git.js"],
label: "jQuery UI WIP (via git)",
group: "jQuery UI"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.min.css", "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js", "http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"],
label: "jQuery UI latest",
group: "jQuery UI"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css", "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js", "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"],
label: "jQuery UI 1.10.3",
group: "jQuery UI"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/smoothness/jquery-ui.min.css", "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js", "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"],
label: "jQuery UI 1.9.2",
group: "jQuery UI"
}, {
url: ["http://code.jquery.com/mobile/latest/jquery.mobile.css", "http://code.jquery.com/jquery-1.9.1.min.js", "http://code.jquery.com/mobile/latest/jquery.mobile.js"],
label: "jQuery Mobile Latest",
group: "jQuery Mobile"
}, {
url: ["http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css", "http://code.jquery.com/jquery-1.8.2.min.js", "http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"],
label: "jQuery Mobile 1.3.1",
group: "jQuery Mobile"
}, {
url: ["http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css", "http://code.jquery.com/jquery-1.8.3.min.js", "http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"],
label: "jQuery Mobile 1.2.1",
group: "jQuery Mobile"
}, {
url: ["http://code.jquery.com/mobile/1.1.2/jquery.mobile-1.1.2.min.css", "http://code.jquery.com/jquery-1.6.4.min.js", "http://code.jquery.com/mobile/1.1.2/jquery.mobile-1.1.2.min.js"],
label: "jQuery Mobile 1.1.2",
group: "jQuery Mobile"
}, {
url: ["http://code.jquery.com/jquery.min.js", "http://twitter.github.io/bootstrap/assets/css/bootstrap.css", "http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css", "http://twitter.github.io/bootstrap/assets/js/bootstrap.js"],
label: "Bootstrap latest",
group: "Bootstrap"
}, {
url: "http://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js",
label: "Prototype latest",
group: "Prototype"
}, {
url: "http://ajax.googleapis.com/ajax/libs/prototype/1.7/prototype.js",
label: "Prototype 1.7.1",
group: "Prototype"
}, {
url: "http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js",
label: "Prototype 1.6.1.0",
group: "Prototype"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js", "http://ajax.googleapis.com/ajax/libs/scriptaculous/1/scriptaculous.js"],
label: "script.aculo.us latest",
group: "Prototype"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js", "http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js"],
label: "script.aculo.us 1.8.3",
group: "Prototype"
}, {
url: "http://yui.yahooapis.com/3.10.0/build/yui/yui.js",
label: "YUI 3.10.0",
group: "YUI"
}, {
url: "http://yui.yahooapis.com/2.9.0/build/yuiloader/yuiloader-min.js",
label: "YUI 2.9.0",
group: "YUI"
}, {
url: "http://ajax.googleapis.com/ajax/libs/mootools/1/mootools-yui-compressed.js",
label: "MooTools latest",
group: "MooTools"
}, {
url: "http://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js",
label: "MooTools 1.4.5",
group: "MooTools"
}, {
url: "http://ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.js",
label: "Dojo latest",
group: "Dojo"
}, {
url: "http://ajax.googleapis.com/ajax/libs/dojo/1.8/dojo/dojo.js",
label: "Dojo 1.8.4",
group: "Dojo"
}, {
url: "http://ajax.googleapis.com/ajax/libs/dojo/1.7/dojo/dojo.js",
label: "Dojo 1.7.4",
group: "Dojo"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/dojo/1/dijit/themes/claro/claro.css", "http://ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.js"],
label: "Dijit latest (Claro)",
group: "Dojo"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/dojo/1.8.4/dijit/themes/claro/claro.css", "http://ajax.googleapis.com/ajax/libs/dojo/1.8.4/dojo/dojo.js"],
label: "Dijit 1.8.4 (Claro)",
group: "Dojo"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/dojo/1.7.4/dijit/themes/claro/claro.css", "http://ajax.googleapis.com/ajax/libs/dojo/1.7.4/dojo/dojo.xd.js"],
label: "Dijit 1.7.4 (Claro)",
group: "Dojo"
}, {
url: ["http://cdn.kendostatic.com/2013.1.319/styles/kendo.common.min.css", "http://cdn.kendostatic.com/2013.1.319/styles/kendo.rtl.min.css", "http://cdn.kendostatic.com/2013.1.319/styles/kendo.default.min.css", "http://cdn.kendostatic.com/2013.1.319/styles/kendo.dataviz.min.css", "http://cdn.kendostatic.com/2013.1.319/styles/kendo.dataviz.default.min.css", "http://cdn.kendostatic.com/2013.1.319/styles/kendo.mobile.all.min.css", "http://code.jquery.com/jquery-1.9.1.min.js", "http://cdn.kendostatic.com/2013.1.319/js/kendo.all.min.js"],
label: "Kendo UI Q1 2013",
group: "Kendo UI"
}, {
url: ["http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css", "http://cdn.kendostatic.com/2012.3.1114/styles/kendo.rtl.min.css", "http://cdn.kendostatic.com/2012.3.1114/styles/kendo.default.min.css", "http://cdn.kendostatic.com/2012.3.1114/styles/kendo.dataviz.min.css", "http://cdn.kendostatic.com/2012.3.1114/styles/kendo.dataviz.default.min.css", "http://cdn.kendostatic.com/2012.3.1114/styles/kendo.mobile.all.min.css", "http://code.jquery.com/jquery-1.8.2.min.js", "http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js"],
label: "Kendo UI Q3 2012",
group: "Kendo UI"
}, {
url: ["http://code.jquery.com/qunit/qunit-git.css", "http://code.jquery.com/qunit/qunit-git.js"],
label: "QUnit",
group: "Testing"
}, {
url: "http://zeptojs.com/zepto.min.js",
label: "Zepto latest",
group: "Zepto"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js",
label: "Zepto 1.0",
group: "Zepto"
}, {
url: "https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js",
label: "Angular 1.1.5 Unstable",
group: "Angular"
}, {
url: "https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js",
label: "Angular 1.0.7 Stable",
group: "Angular"
}, {
url: ["http://nightly.enyojs.com/latest/enyo-nightly/enyo.css", "http://nightly.enyojs.com/latest/enyo-nightly/enyo.js", "http://nightly.enyojs.com/latest/lib/layout/package.js", "http://nightly.enyojs.com/latest/lib/onyx/package.js", "http://nightly.enyojs.com/latest/lib/g11n/package.js", "http://nightly.enyojs.com/latest/lib/canvas/package.js"],
label: "Enyo latest",
group: "Enyo"
}, {
url: ["http://enyojs.com/enyo-2.2.0/enyo.css", "http://enyojs.com/enyo-2.2.0/enyo.js", "http://enyojs.com/enyo-2.2.0/lib/layout/package.js", "http://enyojs.com/enyo-2.2.0/lib/onyx/package.js", "http://enyojs.com/enyo-2.2.0/lib/g11n/package.js", "http://enyojs.com/enyo-2.2.0/lib/canvas/package.js"],
label: "Enyo 2.2.0",
group: "Enyo"
}, {
url: ["http://documentcloud.github.io/underscore/underscore-min.js", "http://documentcloud.github.io/backbone/backbone-min.js"],
label: "Backbone latest"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/bonsai/0.4/bonsai.min.js",
label: "Bonsai 0.4.latest"
}, {
url: "http://jashkenas.github.io/coffee-script/extras/coffee-script.js",
label: "CoffeeScript"
}, {
url: ["http://ajax.googleapis.com/ajax/libs/jquery/1.9/jquery.min.js", "http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.4/ember.min.js"],
label: "Ember.js 1.0.0-rc.4"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.0.8/es5-shim.min.js",
label: "ES5 shim 2.0.8"
}, {
url: ["http://extjs.cachefly.net/ext-3.1.0/resources/css/ext-all.css", "http://cdnjs.cloudflare.com/ajax/libs/ext-core/3.1.0/ext-core.min.js"],
label: "ext-core 3.1.0"
}, {
url: ["http://cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/css/normalize.min.css", "http://cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/css/foundation.min.css", "http://cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/js/vendor/custom.modernizr.min.js", "http://cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/js/vendor/jquery.min.js", "http://cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/js/foundation.min.js"],
label: "Foundation 4.1.6"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js",
label: "Handlebars.js 1.0.0"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/knockout/2.2.1/knockout-min.js",
label: "Knockout 2.2.1"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/less.js/1.3.3/less.min.js",
label: "Less 1.3.3"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.1/lodash.min.js",
label: "lodash 1.2.1"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js",
label: "Modernizr 2.6.2"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js",
label: "Prefixfree 1.0.7"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js",
label: "Processing 1.4.1"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js",
label: "Rapha&euml;l 2.1.0"
}, {
url: "http://cdnjs.cloudflare.com/ajax/libs/sammy.js/0.7.4/sammy.min.js",
label: "Sammy 0.7.4"
}, {
url: ["http://cdn.sencha.io/touch/1.1.0/resources/css/sencha-touch.css", "http://cdn.sencha.io/touch/1.1.0/sencha-touch.js"],
label: "Sencha Touch"
}, {
url: [jsbin.static + "/js/vendor/traceur.js"],
label: "Traceur"
}, {
url: "http://remy.github.io/twitterlib/twitterlib.min.js",
label: "TwitterLib"
}, {
url: "http://documentcloud.github.io/underscore/underscore-min.js",
label: "underscore latest"
}, {
url: ["http://code.jquery.com/jquery-1.9.1.min.js", " //canjs.us/release/latest/can.jquery.js"],
label: "CanJS for jQuery"
}, {
url: ["http://cdnjs.cloudflare.com/ajax/libs/three.js/r58/three.min.js"],
label: "Three.js r58"
}, {
url: ["http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"],
label: "HTML5 shiv"
}];
window.libraries = libraries, libraries.userSpecified = JSON.parse(localStorage.getItem("libraries") || "[]");
for (var i = 0; i < libraries.userSpecified.length; i++) libraries.push(libraries.userSpecified[i]);
libraries.add = function (a) {
a.scripts ? a.scripts.forEach(function (b) {
b.group = a.text, b.label = b.text, this.userSpecified.push(b), libraries.push(b)
}.bind(this)) : (a.group = "Custom", this.userSpecified.push(a), libraries.push(a));
try {
localStorage.setItem("libraries", JSON.stringify(this.userSpecified))
} catch (b) {}
$("#library").trigger("init")
}, libraries.clear = function () {
libraries.userSpecified = [], localStorage.removeItem("libraries");
for (var a = libraries.length, b = 0; a > b; b++) "Custom" === libraries[b].group && (libraries.splice(b, 1), a--);
$("#library").trigger("init")
};
var $library = $("#library"),
groups = {};
$library.bind("init", function () {
var a = 0,
b = 0,
c = {}, d = [],
e = {}, f = "",
g = "";
for (groups = {}, $library.empty(), a = 0; a < libraries.length, c = libraries[a]; a++) f = c.group || "Other", g = f.toLowerCase().replace(/[^a-z0-9]/gi, ""), -1 === d.indexOf(g) ? (e = {
label: f,
libraries: [],
key: g
}, groups[g] = e, d.push(g)) : e = groups[g], e.libraries.push(c);
var h = ['<option value="none">None</option>'];
for (a = 0; a < d.length; a++)
for (e = groups[d[a]], h.push('<option value="" data-group="' + e.label + '" class="heading">-------------</option>'), b = 0; b < e.libraries.length, c = e.libraries[b]; b++) h.push('<option value="' + e.key + ":" + b + '">' + c.label + "</option>");
$library.html(h.join(""))
}).trigger("init"), $library.bind("change", function () {
if (this.value) {
var a = this.value.split(":"),
b = groups[a[0]],
c = b.libraries[a[1]];
insertResources(c.url)
}
}).on("click", function () {
analytics.libraryMenu()
}),
function () {
var a = $("body"),
b = !1,
c = function () {
b || ($("html").hasClass("public-listing") ? g() : $.ajax({
dataType: "html",
url: jsbin.root + "/list",
error: function () {
$("#history").remove(), setTimeout(c, 500)
},
success: function (c) {
$("#history").remove(), a.append(c), g(), b = !0
}
}))
}, d = function (a, b) {
b.attr("src", a + "/quiet"), b.removeAttr("hidden")
}, e = function (a, b) {
b.text(a)
}, f = function (a, b) {
var c = a.parent();
a.detach().each(function () {
var a = $(this),
c = b ? ".archived" : ":not(.archived)",
d = $("tr" + c, a).filter(":not(.spacer)");
d.length > 0 ? (d.filter(".first").removeClass("first"), a.removeClass("hidden"), d.first().addClass("first")) : a.addClass("hidden")
}).appendTo(c)
}, g = function () {
var a = $("#history");
if (a.length) {
var b = $("iframe", a),
c = $("#viewing", a),
g = a,
h = $("tbody", a),
i = $("tr", a),
j = $("td.created a", a),
k = $(".toggle_archive", a),
l = null,
m = null;
g.delegate("tr:not(.spacer)", "click", function () {
event.shiftKey || event.metaKey || (window.location = this.getAttribute("data-edit-url"))
}), g.delegate(".archive, .unarchive", "click", function () {
var b = $(this),
c = b.parents("tr");
return c.toggleClass("archived"), f(h, a.hasClass("archive_mode")), $.ajax({
type: "POST",
url: b.attr("href"),
error: function () {
alert("Something went wrong, please try again"), c.toggleClass("archived"), f(h, a.hasClass("archive_mode"))
},
success: function () {}
}), !1
}), k.change(function () {
a.toggleClass("archive_mode"), f(h, a.hasClass("archive_mode"))
}), g.delegate("tr", "mouseover", function () {
var a = $(this),
f = a.attr("data-url");
return clearTimeout(m), a.hasClass("spacer") || l === f || (m = setTimeout(function () {
i.removeClass("selected"), a.addClass("selected"), l = f, d(f, b), e(f, c)
}, 400)), !1
}), $("a[pubdate]", a).attr("pubdate", function (a, b) {
return b.replace("Z", "+0000")
}).prettyDate(), setInterval(function () {
j.prettyDate()
}, 3e4), setTimeout(function () {
f(h, !1)
}, 0)
}
};
$(function () {
if (!jsbin.embed) {
var b = $("#panels a"),
d = $(".homebtn"),
e = a.hasClass("panelsVisible"),
f = function () {
var a = b.filter(".active").length;
1 === a && $(this).hasClass("active") && c()
};
d.on("click", c), b.on("mousedown", f), e || c()
}
})
}();
var loginVisible = !1,
dropdownOpen = !1,
keyboardHelpVisible = !1,
urlHelpVisible = !1;
$document.keydown(function (a) {
27 == a.which && hideOpen()
}), $document.delegate(".modal", "click", function (a) {
$(a.target).is(".modal") && hideOpen()
}), $("#download").click(function (a) {
a.preventDefault(), window.location = jsbin.getURL() + "/download", analytics.download()
});
var $username = $("#username"),
$password = $("#password"),
$email = $("#email"),
$loginForm = $("form.login").submit(function (a) {
a.preventDefault();
var b = $(this),
c = b.find("input[name=username]").val(),
d = b.find("input[name=password]").val(),
e = b.find("input[name=email]").val(),
f = b.find(".loginFeedback");
f.show().text("Checking..."), $.ajax({
url: jsbin.root + "/sethome",
data: {
name: c,
key: d,
email: e
},
type: "post",
dataType: "json",
complete: function (a) {
var b = $.parseJSON(a.responseText) || {};
b.ok ? (b.avatar && $("#avatar").find("img").remove().end().prepend('<img class="avatar" src="' + b.avatar + '">'), b.message ? f.text(b.message) : window.location = window.location.pathname + window.location.search) : (analytics.login(!1), f.text(b.message || '"' + c + '" has already been taken. Please either double check the password, or choose another username.'))
}
})
}),
$html = $(document.documentElement);
$("#tip a.dismiss").click(function () {
return $html.removeClass("showtip"), $(window).resize(), !1
}), window.showTip = function () {
if (void 0 === jsbin.settings.lastTip && (jsbin.settings.lastTip = -1), tips)
for (var a = 0; a < tips.length; a++)
if (a > jsbin.settings.lastTip) {
$("#tip p").html(tips[a]), jsbin.settings.lastTip = a, $html.addClass("showtip");
break
}
}, $("a.save").click(function (a) {
return a.preventDefault(), analytics.milestone(), saveCode("save", jsbin.saveDisabled === !0 ? !1 : !0), !1
});
var $shareLinks = $("#share .link");
$document.one("saved", function () {
$shareLinks.removeClass("disabled").unbind("click mousedown mouseup")
}), $("#sharemenu").bind("open", function () {
updateSavedState()
}), $document.on("saved", function () {
updateSavedState(), $shareLinks.closest(".menu").removeClass("hidden"), $("#jsbinurl").attr("href", jsbin.getURL()).removeClass("hidden"), $("#clone").removeClass("hidden")
});
var saveChecksum = jsbin.state.checksum || sessionStorage.getItem("checksum") || !1;
saveChecksum ? $("#share div.disabled").removeClass("disabled").unbind("click mousedown mouseup") : $("#share div.disabled").one("click", function (a) {
a.preventDefault(), $("a.save").click()
}), jsbin.saveDisabled || $document.bind("jsbinReady", function () {
$(".code.panel .label .name").append("<span>Saved</span>");
var a = {
html: $(".panel.html .name span"),
javascript: $(".panel.javascript .name span"),
css: $(".panel.css .name span")
};
jsbin.panels.allEditors(function (a) {
a.on("processor", function () {
jsbin.root !== jsbin.getURL() && $document.trigger("codeChange", [{
panelId: a.id
}])
})
}), $document.bind("codeChange", function (b, c) {
a[c.panelId] && a[c.panelId].css({
opacity: 0
}).stop(!0, !0)
}), $document.bind("saveComplete", throttle(function (b, c) {
a[c.panelId].stop(!0, !0).animate({
opacity: 1
}, 100).delay(1200).animate({
opacity: "0"
}, 500)
}, 500)), $document.bind("codeChange", throttle(function (a, b) {
if (b.panelId) {
var c = b.panelId,
d = {};
jsbin.state.processors && (d.processors = jsbin.state.processors), saveChecksum ? $.ajax({
url: jsbin.getURL() + "/save",
data: {
code: jsbin.state.code,
revision: jsbin.state.revision,
method: "update",
panel: b.panelId,
content: editors[b.panelId].getCode(),
checksum: saveChecksum,
settings: JSON.stringify(d)
},
type: "post",
dataType: "json",
headers: {
Accept: "application/json"
},
success: function (a) {
$document.trigger("saveComplete", {
panelId: c
}), a.error && saveCode("save", !0, function () {})
},
error: onSaveError
}) : saveCode("save", !0)
}
}, 250))
}), $("a.clone").click(function (a) {
a.preventDefault(), jsbin.panels.save(), analytics.clone();
var b = setupform("save,new");
return b.submit(), !1
}), window.File && window.FileList && window.FileReader && allowDrop(document.body);
var Gist = function (a) {
this.code = "";
var b = $('<iframe id="gistloader' + a + '" />').css("display", "none").appendTo(document.body),
c = b[0].contentDocument || b[0].contentWindow.document,
d = this;
this.code = {}, analytics.loadGist(a), b.load(function () {
$(".gist-file", c.body).each(function () {
var a = [];
$("pre .line", this).each(function () {
a.push($(this).text())
});
var b = $(".gist-meta a:first", this).attr("href"),
c = "html";
"js" == b.substr(-2) && (c = "javascript"), "css" == b.substr(-3) && (c = "css"), d.code[c] = a.join("\n")
}), d.setCode(), b.remove()
}), c.open(), c.write('<script src="http://gist.github.com/' + a + '.js"></script>'), c.close()
};
Gist.prototype.setCode = function () {
for (var a in this.code) editors[a].setCode(gist.code[a])
}, !/gist(\/.*)?\/\d+/.test(window.location.pathname) || sessionStorage.getItem("javascript") || sessionStorage.getItem("html") || (window.editors = editors, loadGist = function () {
$.getScript("/js/chrome/gist.js", function () {
window.gist = new Gist(window.location.pathname.replace(/.*?(\d+).*/, "$1"))
})
}, editors.ready ? loadGist() : $document.on("jsbinReady", loadGist)), jsbin.mobile || (document.body.onscroll = window.onscroll = function () {
return 0 !== document.body.scrollTop && window.scrollTo(0, 0), !1
}), window.CodeMirror = CodeMirror, delete CodeMirror.keyMap["default"]["Cmd-L"], delete CodeMirror.keyMap["default"]["Cmd-T"], delete CodeMirror.keyMap["default"]["Cmd-W"], delete CodeMirror.keyMap["default"]["Cmd-J"], delete CodeMirror.keyMap["default"]["Cmd-R"];
var link = document.createElement("link");
link.rel = "stylesheet", link.href = jsbin["static"] + "/css/font.css?" + jsbin.version, link.type = "text/css", document.getElementsByTagName("head")[0].appendChild(link), jsbin.embed && analytics.embed();
/*
//@ sourceMappingURL=/js/prod/jsbin.map.json
*/